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

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 12 Feb 2004 10:54:30 -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 t7@pobox.com.

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

--- shadow/53921	2004-02-05 09:10:22.000000000 -0500
+++ shadow/53921.tmp.3264	2004-02-12 10:54:30.000000000 -0500
@@ -1,15 +1,15 @@
 Bug#: 53921
 Product: Mono/Compilers
 Version: unspecified
-OS: 
-OS Details: 
+OS: Fedora 1.0
+OS Details: Redhat FC1
 Status: NEW   
 Resolution: 
-Severity: 
-Priority: Normal
+Severity: Unknown
+Priority: Major
 Component: C#
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: rshade@dvsconsulting.com               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
 URL: 
@@ -47,6 +47,86 @@
         } 
     } 
 } 
  
 An interesting note is that if the "using x;" is taken out, it compiles 
 fine.
+
+------- Additional Comments From t7@pobox.com  2004-02-12 10:54 -------
+I *think* this is another instance of the same bug.
+I'm not sure, but I think in v0.29 it was working and now in 0.30 is
+doesn't.
+
+Code snippet:
+
+using System;
+
+namespace ns_a
+{
+
+  class A
+  {
+
+    public A(string f) { from = f; }
+
+    public virtual string getClass() { return "A:"+from; }
+
+    protected string from;
+  }
+
+}
+
+
+namespace ns_b
+{
+
+  class X : ns_a.A
+  {
+
+    public X(string f) : base(f) {}
+
+    public override string getClass() { return "ns_b.X:"+from; }
+
+  }
+
+}
+
+namespace ns_c
+{
+
+  class X : ns_a.A
+  {
+
+    public X(string f) :base(f) {}
+
+    public override string getClass() { return "ns_c.X:"+from; }
+
+  }
+
+}
+
+
+
+
+namespace ns_b 
+{
+
+  using X = ns_c.X;
+
+
+  public class Test
+  {
+     public static void Main()
+     {
+       X x = new X("main");
+       Console.WriteLine("x is "+x.getClass());
+     }
+  }
+
+
+}
+
+
+---
+This outputs:
+x is ns_b.X:main
+