[Mono-bugs] [Bug 21072] New - Crash compiling a constant variable of Enum type

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
26 Feb 2002 15:32:36 -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=21072

--- shadow/21072	Tue Feb 26 10:32:36 2002
+++ shadow/21072.tmp.10172	Tue Feb 26 10:32:36 2002
@@ -0,0 +1,43 @@
+Bug#: 21072
+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 a constant variable of Enum type
+
+Description of Problem:
+Crash when defining a 'const' variable of a Enum derived type.
+There is no problem defining a non const variable of the same type.
+
+There is a comment in file 'Const.cs, line 137' suggesting that this is 
+not going to be the final code, so may be you guys are already aware of 
+this issue.
+
+Additional Information:
+Using snapshot of Feb-24-02
+
+Sample code to reproduce the problem:
+
+namespace N1
+{	
+	public enum A
+	{
+		A_1, A_2, A_3
+	}
+
+	public class B
+	{
+		const A b = A.A_1;
+	}
+}