[Mono-bugs] [Bug 650850] New: Recursive type definition doesn't compile in gmcs, does in Microsoft C#

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Nov 2 18:59:51 EDT 2010



           Summary: Recursive type definition doesn't compile in gmcs,
                    does in Microsoft C#
    Classification: Mono
           Product: Mono: Compilers
           Version: SVN
          Platform: x86-64
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: xocotl at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-us) AppleWebKit/531.2+
(KHTML, like Gecko) Version/5.0 Safari/531.2+ Ubuntu/10.04 LTS ()

In my code I have:

        protected TResultType SetCallbacks<TResult, TResultType>(Fiber fiber,
Func<TValue, DeferredReturn<TResult, TResultType>> callback, Func<Exception,
DeferredReturn<TResult, TResultType>> errback)
            where TResultType : DeferredBase<TResult, TResultType>, new()

This does not compile with gmcs. The error is:

Error CS0314: The type `TResultType' cannot be used as type parameter
`TResultType' in the generic type or method
There is no boxing or type parameter conversion from `TResultType' to
`IllusoryStudios.DeferredTasks.DeferredBase<TResult,TResultType>' (CS0314)

If you want to test building it and need the full source (if this is not
enough), the URL is http://git.zer7.com/?p=deferred.git;a=summary

Reproducible: Always

Steps to Reproduce:

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