[Mono-bugs] [Bug 53921][Nor] New - using alias directives should override names in the current scope

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 5 Feb 2004 09:10:23 -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 rshade@dvsconsulting.com.

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

--- shadow/53921	2004-02-05 09:10:22.000000000 -0500
+++ shadow/53921.tmp.24083	2004-02-05 09:10:22.000000000 -0500
@@ -0,0 +1,52 @@
+Bug#: 53921
+Product: Mono/Compilers
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: rshade@dvsconsulting.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: using alias directives should override names in the current scope
+
+The following code results in a CS0104 in mcs.  It compiles correctly 
+with csc. 
+ 
+using x; 
+using y; 
+using Test = x.Test; 
+ 
+namespace x 
+{ 
+    public class Test 
+    { 
+    } 
+} 
+ 
+namespace y 
+{ 
+    public class Test 
+    { 
+    } 
+} 
+namespace b 
+{ 
+    public class a 
+    { 
+        public static void Main() 
+        { 
+            // Test should be an alias to x.Test 
+            Test test = new Test(); 
+        } 
+    } 
+} 
+ 
+An interesting note is that if the "using x;" is taken out, it compiles 
+fine.