https://bugzilla.novell.com/show_bug.cgi?id=433701
Summary: Compiler error with generics and constraints should be
improved
Product: Mono: Compilers
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: Minor
Priority: P5 - None
Component: C#
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
QAContact: [email protected]
Found By: ---
If we try to compile this method:
I Get<I>() { return new object() as I; }
With csc I get: CS0413: The type parameter 'I' cannot be used with the 'as'
operator because it does not have a class type constraint nor a 'class'
constraint
But with gmcs I get: The `as' operator cannot be used with a non-reference type
parameter `I'(CS0413)
Yes, they mean the same, but the csc one gives clues about the solution.
--
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.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs