[Mono-bugs] [Bug 472805] New: gmcs incorrectly reports ambiguity with extension methods

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Feb 5 06:31:03 EST 2009


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


           Summary: gmcs incorrectly reports ambiguity with extension
                    methods
    Classification: Mono
           Product: Mono: Compilers
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: juraj at hotfeet.ch
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Created an attachment (id=270343)
 --> (https://bugzilla.novell.com/attachment.cgi?id=270343)
trivial test case

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.5)
Gecko/2008121622 Fedora/3.0.5-1.fc10 Firefox/3.0.5

Gmcs incorrectly considers a public extension method in an internal class (from
a referenced assembly) and reports an error CS0121.

Reproducible: Always

Steps to Reproduce:
1. gmcs EnumerableExtensions.cs -target:library -out:Extensions.dll
2. gmcs test.cs -r:Extensions.dll
Actual Results:  
test.cs(9,52): error CS0121: The call is ambiguous between the following
methods or properties: `Extensions.EnumerableExtensions.Cast<string>(this
System.Collections.IEnumerable)' and `System.Linq.Enumerable.Cast<string>(this
System.Collections.IEnumerable)'
/home/js/Extensions.dll (Location of the symbol related to previous error)
/usr/local/lib/mono/gac/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
(Location of the symbol related to previous error)
Compilation failed: 1 error(s), 0 warnings

Expected Results:  
test.cs compiles just fine.

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


More information about the mono-bugs mailing list