[Mono-bugs] [Bug 349190] New: gmcs doesn't like use of Extension Methods

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Dec 17 07:04:45 EST 2007


           Summary: gmcs doesn't like use of Extension Methods
           Product: Mono: Compilers
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at ximian.com
        ReportedBy: jpryor at novell.com
         QAContact: mono-bugs at ximian.com
          Found By: ---

gmcs doesn't like use of Extension Methods.

Sorry for the bad summary; not sure how to better describe it.

gmcs doesn't like the attached C# code, while CSC 3.5 does.

To reproduce:

1. Compile the attached source code:

  gmcs -langversion:linq -r:System.Core ns4.cs

Expected Output:

No errors.

Actual Output:

ns4.cs(69,52): error CS0029: Cannot implicitly convert type `T' to `T'
ns4.cs(69,52): The generic parameter `T' of
System.Collections.Generic.IEnumerable<T>)' cannot be converted to the generic
parameter `T' of `Mono.Rocks.IEnumerable.<>c__CompilerGenerated1<T>' (in the
previous error)
ns4.cs(69,52): error CS1662: Cannot convert `lambda expression' to delegate
type `System.Func<T,T>' because some of the return types in the block are not
implicitly convertible to the delegate return type
Compilation failed: 2 error(s), 0 warnings

Note that this makes no sense, as T should always be implicitly convertable to
T. :-)

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