[Mono-bugs] [Bug 75746][Nor] New - constants not propagated with
byte enums
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Mon Aug 8 10:43:34 EDT 2005
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 lupus at ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=75746
--- shadow/75746 2005-08-08 10:43:34.000000000 -0400
+++ shadow/75746.tmp.30440 2005-08-08 10:43:34.000000000 -0400
@@ -0,0 +1,32 @@
+Bug#: 75746
+Product: Mono: Compilers
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: lupus at ximian.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: constants not propagated with byte enums
+
+The following program fails to compile with the error message:
+enum-def.cs(8,18): error CS0133: The expression being assigned to
+`EmptyTypeByte' must be constant
+It compiles fine if the enum type is changed to int (note, also other types
+may fail).
+enum TypeByte : byte {
+ Min = Byte,
+ Byte = 1,
+}
+class T {
+ static void Main () {
+ const TypeByte EmptyTypeByte = TypeByte.Min - 1;
+ }
+}
More information about the mono-bugs
mailing list