Please do not reply to this email- if you want to comment on the bug, go to the URL shown below and enter your comments there.
Changed by [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=78497 --- shadow/78497 2006-05-23 18:09:50.000000000 -0400 +++ shadow/78497.tmp.23994 2006-05-23 18:09:50.000000000 -0400 @@ -0,0 +1,52 @@ +Bug#: 78497 +Product: Mono: Class Libraries +Version: 1.1 +OS: +OS Details: +Status: NEW +Resolution: +Severity: +Priority: Minor +Component: CORLIB +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: using generic with wrong number of types should produce CS0305 + +Here is some sample code in which a generic class is referred to with the +wrong number of types: + +public class MyList<T> {} +public class MyClass<T> {} + +class MyClass +{ + public static void Main() + { + MyList<MyClass, MyClass> list1 = new MyList<MyClass>(); // CS0305 + MyList<MyClass> list2 = new MyList<MyClass>(); // OK + } +} + +Running this on MS.NET 2.0 produces: + +C:\Documents and Settings\Scott Ellington\Desktop>csc cs0305.cs +Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.42 +for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727 +Copyright (C) Microsoft Corporation 2001-2005. All rights reserved. + +cs0305.cs(9,7): error CS0305: Using the generic type 'MyList<T>' requires '1' + type arguments +cs0305.cs(2,14): (Location of symbol related to previous error) + +Running on Mono ( 1.1.13.6 ) produces: + +$ gmcs cs0305.cs +cs0305.cs(9,7): error CS0246: The type or namespace name `MyList`2' could +not be found. Are you missing a using directive or an assembly reference? +Compilation failed: 1 error(s), 0 warnings + +I think Mono should give an CS0305 error. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
