[Mono-bugs] [Bug 36316][Nor] New - using statement not resolved correctly

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Sun, 5 Jan 2003 05:21:15 -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 cdaly@locosoft.net.

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

--- shadow/36316	Sun Jan  5 05:21:15 2003
+++ shadow/36316.tmp.3637	Sun Jan  5 05:21:15 2003
@@ -0,0 +1,64 @@
+Bug#: 36316
+Product: Mono/MCS
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: cdaly@locosoft.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: using statement not resolved correctly
+
+Please fill in this template when reporting a bug, unless you know what you are doing.
+Description of Problem:
+
+This was observed with mcs 0.17.  C# using statements do not need
+to be rooted in the global namespace. In the test case below the
+qualified identifier in the using statement needs to be resolved
+in one of the enclosing namespaces.  In other words the name resolver
+should check first for the existance of N1.N2.N3.N4, followed by
+N1.N3.N4 (which it will find).  If the second check was unsuccessful
+it would by followed by a check for (globally rooted) N3.N4.
+
+
+namespace N1.N2
+{
+    using N3.N4;
+
+    public class Foo : Bar
+    {
+    }
+}
+
+namespace N1.N3.N4
+{
+    public class Bar
+    {
+    }
+}
+
+Steps to reproduce the problem:
+1. compile the test case above
+2. ?
+3. profit!
+
+Actual Results: compile error:
+
+Bug5.cs(6) error CS0246: Cannot find type `Bar'
+Compilation failed: 1 error(s), 0 warnings
+
+
+Expected Results:  successful compile
+
+
+How often does this happen? always
+
+
+Additional Information: