[Mono-bugs] [Bug 705711] New: Extension method overload resolution fails when located in different namespaces

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Jul 14 06:03:09 EDT 2011


https://bugzilla.novell.com/show_bug.cgi?id=705711

https://bugzilla.novell.com/show_bug.cgi?id=705711#c0


           Summary: Extension method overload resolution fails when
                    located in different namespaces
    Classification: Mono
           Product: Mono: Compilers
           Version: 1.2.0
          Platform: x86-64
        OS/Version: openSUSE 11.4
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: C#
        AssignedTo: michael.miller at suse.com
        ReportedBy: andreas+novell at selfinflicted.org
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Created an attachment (id=439901)
 --> (http://bugzilla.novell.com/attachment.cgi?id=439901)
Solution to reproduce the bug.. comments in the files helps reproduce it

User-Agent:       Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML,
like Gecko) Chrome/14.0.803.0 Safari/535.1

We had two extension methods, with the same name but different signatures,
located in two different namespaces. When both namespaces were included it was
unable to resolve the correct overload.

One overload had 2 parameters, the other one 6. We kept being hit by a compile
error saying that there were no overload that accepted two parameters.

The attached solution shows how to reproduce. Check the code comments in the
files on how to toggle the error on and off.

Reproducible: Always

Steps to Reproduce:
1. See code comments in the attached solution
2.
3.
Actual Results:  
Compile error saying that there were no overload that accepted two parameters.

Expected Results:  
The compiler should resolve the correct overload when it is available

This was verified on two different machines, both running openSUES 11.4 and
Mono 2.10.2 using MonoDevelop 2.6 Beta 3

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list