https://bugzilla.novell.com/show_bug.cgi?id=367542
Summary: [GMCS] CS0119 not report when accessing member on type
parameter
Product: Mono: Compilers
Version: SVN
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
QAContact: [email protected]
Found By: ---
gmcs does not report CS0119 when members of a type parameter are accessed.
To reproduce, compile the following code:
public class NonGen
{
public static int field = 123;
}
public class NonGenUser<T> where T : NonGen
{
public int getNonGenField ()
{
return T.field;
}
}
Expected result:
test.cs(10,10): error CS0119: 'T' is a 'type parameter', which is not valid in
the given context
Actual result:
No error.
--
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