[Mono-bugs] [Bug 52517][Nor] New - Type definitions are being looked up differently than member access
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Wed, 7 Jan 2004 01:56:08 -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 miguel@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=52517
--- shadow/52517 2004-01-07 01:56:08.000000000 -0500
+++ shadow/52517.tmp.499 2004-01-07 01:56:08.000000000 -0500
@@ -0,0 +1,78 @@
+Bug#: 52517
+Product: Mono/Compilers
+Version: unspecified
+OS: All
+OS Details:
+Status: NEW
+Resolution:
+Severity: Unknown
+Priority: Normal
+Component: C#
+AssignedTo: martin@ximian.com
+ReportedBy: pcgod@gmx.net
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Type definitions are being looked up differently than member access
+
+Description of Problem:
+mcs doesn't allow conversion of an enum in another namespace (used with an
+alias) to converted to another enum type. This works with csc.
+
+Steps to reproduce the problem:
+1. Try to compile both files together.
+
+Actual Results:
+nf-test2.cs(29) error CS0029: Cannot convert implicitly from `T+Mat' to
+`ABC.BMT'
+
+Expected Results:
+Compile without error.
+
+How often does this happen?
+Always
+
+------- Additional Comments From pcgod@gmx.net 2003-12-23 17:10 -------
+Created an attachment (id=6310)
+test case - part 1
+
+
+------- Additional Comments From pcgod@gmx.net 2003-12-23 17:10 -------
+Created an attachment (id=6311)
+test case - part 2
+
+
+------- Additional Comments From miguel@ximian.com 2004-01-07 01:56 -------
+The bug above is actually a lookup bug: the above sample in CSC
+never references the enumeration in the second file, while in MCS we
+do, so the problem is that we have two different types involved.
+
+CSC only sees one.
+
+Here is a sample 1-file reproduction
+
+using System;
+using Mat = ABC.BMT;
+
+namespace ABC
+{
+ public enum BMT
+ {
+ X,
+ }
+}
+
+class T {
+ private enum Mat
+ {
+ A,
+ B
+ }
+
+ public static void Main() {
+ Mat c;
+ c = Mat.A;
+ }
+}
+