[Mono-bugs] [Bug 424684] New: Generic class constraints must come first

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Sep 9 04:05:55 EDT 2008


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


           Summary: Generic class constraints must come first
           Product: Mono: Compilers
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: lunchtimemama at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Test case:

class Foo<T>
{
}

class Bar<T> where T : IDisposable, Foo<T>
{
}

Actual result:
It compiles.

Expected result:
It should complain, very lamely, that "The class type constraint 'Foo<T>' must
come before any other constraints." At least, that's what csc does. Lame, I
know. The correct code (according to csc) is:

class Bar<T> where T : Foo<T>, IDisposable


-- 
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