[Mono-bugs] [Bug 81840][Nor] New - [GMCS] CS0308 must be reported when non-generic type is used with type arguments

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Jun 10 05:37:18 EDT 2007


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 gert.driesen at pandora.be.

http://bugzilla.ximian.com/show_bug.cgi?id=81840

--- shadow/81840	2007-06-10 05:37:18.000000000 -0400
+++ shadow/81840.tmp.10758	2007-06-10 05:37:18.000000000 -0400
@@ -0,0 +1,49 @@
+Bug#: 81840
+Product: Mono: Compilers
+Version: 1.2
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: gert.driesen at pandora.be               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: [GMCS] CS0308 must be reported when non-generic type is used with type arguments
+
+When a non-generic type is used with type arguments, then MS reports error 
+CS0308 while we report CS0246.
+
+To reproduce, compile the following code snippet:
+
+class Program
+{
+  static NamingContext<int> Lookup ()
+  {
+    return null;
+  }
+
+  static void Main ()
+  {
+    Lookup ();
+  }
+}
+
+class NamingContext
+{
+}
+
+Expected result:
+
+error CS0308: The non-generic type 'NamingContext' cannot be used with 
+type arguments
+
+Actual result:
+
+error CS0246: The type or namespace name `NamingContext`1' could not be 
+found. Are you missing a using directive or an assembly reference?


More information about the mono-bugs mailing list