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

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
27 Feb 2002 00:56:16 -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 miguel@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=21072

--- shadow/21072	Tue Feb 26 10:32:36 2002
+++ shadow/21072.tmp.21860	Tue Feb 26 19:56:16 2002
@@ -1,22 +1,21 @@
 Bug#: 21072
 Product: Mono/MCS
 Version: unspecified
-OS: 
+OS: unknown
 OS Details: 
 Status: NEW   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Minor
 Component: Misc
-AssignedTo: mono-bugs@ximian.com                            
+AssignedTo: lupus@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.
 
@@ -38,6 +37,17 @@
 
 	public class B
 	{
 		const A b = A.A_1;
 	}
 }
+
+------- Additional Comments From miguel@ximian.com  2002-02-26 19:56 -------
+This bug sadly can not be fixed on Windows, as there is no way in .NET
+to create an object of a user defined enumeration and pass this to the
+FieldBuilder.SetConstant method.
+
+We will be able to work around this on our implementation of
+System.Reflection, but I can not figure out how to get this to work
+with .NET.
+
+I have included a descriptive message about this in the compiler now.