[Mono-bugs] [Bug 76486][Wis] New - Incorrect compiling error in mcs, works in gmcs

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Oct 19 19:19:12 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 lluis at ximian.com.

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

--- shadow/76486	2005-10-19 19:19:12.000000000 -0400
+++ shadow/76486.tmp.6141	2005-10-19 19:19:12.000000000 -0400
@@ -0,0 +1,54 @@
+Bug#: 76486
+Product: Mono: Compilers
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: lluis at ximian.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Incorrect compiling error in mcs, works in gmcs
+
+mcs reports an error trying to compile the following code:
+
+namespace AA {
+
+	using System;
+
+	[Flags]
+	public enum ModifierType {
+
+		ShiftMask = 1 << 0,
+		LockMask = 1 << 1,
+		ControlMask = 1 << 2,
+		Mod1Mask = 1 << 3,
+		Mod2Mask = 1 << 4,
+		Mod3Mask = 1 << 5,
+		Mod4Mask = 1 << 6,
+		Mod5Mask = 1 << 7,
+		Button1Mask = 1 << 8,
+		Button2Mask = 1 << 9,
+		Button3Mask = 1 << 10,
+		Button4Mask = 1 << 11,
+		Button5Mask = 1 << 12,
+		ReleaseMask = 1 << 30,
+		ModifierMask = ReleaseMask | 0x1fff,
+		None = 0,
+	}
+}
+
+The error is :
+
+kk.cs(23,18): error CS0019: Operator `|' cannot be applied to operands of
+type `int' and `AA.ModifierType'
+kk.cs(23,18): error CS0133: The expression being assigned to
+`AA.ModifierType.ModifierMask' must be constant
+
+It compiles fine with gmcs and csc.


More information about the mono-bugs mailing list