[Mono-bugs] [Bug 21070] Changed - Crash compiling Enum when values initialized with other enum values.

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
28 Feb 2002 23:03:43 -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_ai@hotmail.com.


--- shadow/21070	Tue Feb 26 10:22:09 2002
+++ shadow/21070.tmp.20348	Thu Feb 28 18:03:43 2002
@@ -1,14 +1,14 @@
 Bug#: 21070
 Product: Mono/MCS
 Version: unspecified
+OS: unknown
 OS Details: 
 Status: NEW   
+Severity: Unknown
 Priority: Minor
 Component: Misc
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: f_ai@hotmail.com               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
@@ -44,6 +44,25 @@
 	public enum C
 		B_1, B_2, B_3 = N1.A.A_1 
+------- Additional Comments From f_ai@hotmail.com  2002-02-28 18:03 -------
+I found the crash source, on 'SimpleName.SimpleNameResolve' the
+ec.TypeContainer.TypeBuilder value can be null, and this will cause 
+the call to 'MemberLookup' to crash.
+By handling the possible 'null' the crash is avoided.
+if (ec.TypeContainer.TypeBuilder != null)
+	e = MemberLookup (ec, ec.TypeContainer.TypeBuilder, Name, 
+Once this change is introduced, there is still a type lookup 
+problem, only fully qualified types can be used to reference the 
+In the sample code provided:
+B will fail because A.A_1 is not found.
+C is fine now.