[Mono-bugs] [Bug 21070] New - Crash compiling Enum when values initialized with other enum values.
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
26 Feb 2002 15:22:09 -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.
http://bugzilla.ximian.com/show_bug.cgi?id=21070
--- shadow/21070 Tue Feb 26 10:22:09 2002
+++ shadow/21070.tmp.10045 Tue Feb 26 10:22:09 2002
@@ -0,0 +1,49 @@
+Bug#: 21070
+Product: Mono/MCS
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Minor
+Component: Misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: f_ai@hotmail.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Crash compiling Enum when values initialized with other enum values.
+
+Description of Problem:
+There is a crash when the enum items are initialized with other enum
+value.
+
+More details:(this is what i think is happening)
+When defining 'A', ' LookupEnumValue' is called to properly define A_3,
+for this an Expression.Resolve is called, eventually the we require the
+Type 'A' to be defined during the 'Resolve' but this is just what we are
+defining in the first place.
+
+Additional Information:
+Using snapshot of Feb-24-02.
+
+Source code to reproduce the problem:
+namespace N1
+{
+ public enum A
+ {
+ A_1, A_2, A_3 = A_1 + A_2
+ }
+
+ public enum B
+ {
+ B_1, B_2, B_3 = A.A_1
+ }
+
+ public enum C
+ {
+ B_1, B_2, B_3 = N1.A.A_1
+ }
+}