[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


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

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


           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 ()
Epiphany/2.30.2

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:

/home/james/Code/src/oss/deferred/IllusoryStudios.DeferredTasks/Deferred.cs(9,9):
Error CS0314: The type `TResultType' cannot be used as type parameter
`TResultType' in the generic type or method
`IllusoryStudios.DeferredTasks.DeferredBase<TValue,TValueType>.<SetCallbacks>c__AnonStorey9<TResult,TResultType>'.
There is no boxing or type parameter conversion from `TResultType' to
`IllusoryStudios.DeferredTasks.DeferredBase<TResult,TResultType>' (CS0314)
(IllusoryStudios.DeferredTasks)

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:
1.
2.
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.
You are the assignee for the bug.


More information about the mono-bugs mailing list