[Mono-bugs] [Bug 43915][Nor] New - mcs fails to recognize OR-ed enumerator values as constant
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
Fri, 30 May 2003 08:57:07 -0400 (EDT)
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 vargaz@freemail.hu.
http://bugzilla.ximian.com/show_bug.cgi?id=43915
--- shadow/43915 Fri May 30 08:57:07 2003
+++ shadow/43915.tmp.19955 Fri May 30 08:57:07 2003
@@ -0,0 +1,39 @@
+Bug#: 43915
+Product: Mono/MCS
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: vargaz@freemail.hu
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: mcs fails to recognize OR-ed enumerator values as constant
+
+This is another IKVM compilation problem:
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+using System;
+
+public enum Modifiers : ushort {
+ A, B, C
+ }
+
+class Bar {
+
+ public const Modifiers x = Modifiers.A | Modifiers.B;
+
+ public static void Main (String[] args) {
+ }
+}
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+When compiling this, mcs reports the following error:
+bug-const.cs(10) error CS0150: A constant value is expected
+
+csc compiles it just fine.