[Mono-bugs] [Bug 46182][Nor] New - Incompatible lookup when namespace name = class name

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Fri, 11 Jul 2003 17:32:31 -0400 (EDT)


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 aherscovici@empirix.com.

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

--- shadow/46182	Fri Jul 11 17:32:30 2003
+++ shadow/46182.tmp.1426	Fri Jul 11 17:32:31 2003
@@ -0,0 +1,44 @@
+Bug#: 46182
+Product: Mono/Runtime
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: aherscovici@empirix.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Incompatible lookup when namespace name = class name
+
+Description of Problem:
+See example.  If there are two classes (A and B) in different namespaces, 
+but with the same base (lets call it "whatever").  Class B has namespace 
+whatever.B and if class A wants to use class B and has a "using 
+whatever.B" then it requires to reference class B as B.B (an error will 
+occur if you just use B).  In mono, the compiler gets confused by B.B and 
+expects B to be in whatever.B.B.B but in .Net B.B is required because 
+otherwise it will think B is a namespace and expect a class (and give said 
+error).
+
+Sounds complicated, but look at the code and play around with it.  It 
+compiles fine in .Net but in mono it can't find the class.
+
+
+Steps to reproduce the problem:
+1. compile code in .Net and witness result
+2. compile code in mono and witness result
+
+Actual Results:
+Test.Variable.Variable does not contain a definition for "Variable"
+
+Expected Results:
+Compilation Succeeded
+
+How often does this happen? 
+Always