[Mono-bugs] [Bug 52622][Wis] New - mcs isn't strict enough with CS0246

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 6 Jan 2004 03:24:59 -0500 (EST)

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 ianm@activestate.com.


--- shadow/52622	2004-01-06 03:24:59.000000000 -0500
+++ shadow/52622.tmp.17200	2004-01-06 03:24:59.000000000 -0500
@@ -0,0 +1,48 @@
+Bug#: 52622
+Product: Mono/Compilers
+Version: unspecified
+OS Details: linux
+Status: NEW   
+Priority: Wishlist
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: ianm@activestate.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: mcs isn't strict enough with CS0246
+Description of Problem:
+mcs compiles code with invalid ( incomplete) using statements that fails
+with csc.exe.
+Steps to reproduce the problem:
+using System;
+class foo {
+    static void Main(string[] args ) {    
+        Reflection.ConstructorInfo ci;        
+    }
+Actual Results:
+compiles correctly with mcs. It looks like its combining System and
+Reflection to implicitly import "System.Reflection". With csc.exe its
+necessary to explicitly import the namespace with :
+using System.Reflection;
+Expected Results:
+this is the output from csc.exe
+test.cs(4,9): error CS0246: The type or namespace name 'Reflection' could
+not be
+        found (are you missing a using directive or an assembly reference?)
+How often does this happen?