[Mono-bugs] [Bug 35224][Nor] New - incorrect AmbiguousTypeReference
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
6 Dec 2002 21:49:03 -0000
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 f_azi@hotmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=35224
--- shadow/35224 Fri Dec 6 16:49:03 2002
+++ shadow/35224.tmp.22390 Fri Dec 6 16:49:03 2002
@@ -0,0 +1,49 @@
+Bug#: 35224
+Product: Mono/MCS
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: f_azi@hotmail.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: incorrect AmbiguousTypeReference
+
+Description of Problem:
+incorrect AmbiguousTypeReference error is reported.
+
+Using the snapshot of Dec 05, 2002
+The followin code reproduces the problem
+"
+using System.Drawing;
+using System.Web.UI.WebControls;
+using Image = System.Drawing.Image;
+namespace ns1
+{
+ public class TheClass
+ {
+ public System.Drawing.Image m_Img1;
+ public System.Web.UI.WebControls.Image m_Img2;
+ public Image m_Img3;
+ public TheClass()
+ {
+ }
+ }
+}
+
+ 'public Image m_Img3'; will fail because 'Image' can be
+System.Drawing.Image or System.Web.UI.WebControls.Image. In the sample
+code there is no actual conflict because the code indicates witch of the
+types is the correct one on the 'alias' statement.
+
+The problem seems to be solved in RootContext.NamespaceLookup, were the
+alias list is checked to see if the name can be solved before looping on
+the using list for the namespaces. Perhaps the same idea should be
+implemented in DeclSpace.FindType where i got the error.