[Mono-bugs] [Bug 38725][Nor] New - unchecked operator being ignored v0.20

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Tue, 25 Feb 2003 19:52:31 -0500 (EST)


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 bryan@alphora.com.

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

--- shadow/38725	Tue Feb 25 19:52:31 2003
+++ shadow/38725.tmp.17690	Tue Feb 25 19:52:31 2003
@@ -0,0 +1,41 @@
+Bug#: 38725
+Product: Mono/MCS
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: bryan@alphora.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: unchecked operator being ignored v0.20
+
+class TestUnchecked
+{
+	byte FFlags;
+
+	public bool CaseSensitive
+	{
+		set
+		{
+			unchecked
+			{
+				FFlags = (byte)-9;
+			}
+		}
+	}
+}
+
+The above code failed to compile with the following error:
+test-unchecked.cs(11) error CS0221: Constant value `-9' cannot be 
+converted to a `byte' (use `unchecked' syntax to over
+ride)
+
+Looks like unchecked is either unimplemented or not handling this case 
+correctly.  Compiles fine in CSC.