[Mono-bugs] [Bug 74979][Maj] New - Problem with switch and break

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue May 17 13:47:50 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 bmaurer at users.sf.net.

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

--- shadow/74979	2005-05-17 13:47:50.000000000 -0400
+++ shadow/74979.tmp.18434	2005-05-17 13:47:50.000000000 -0400
@@ -0,0 +1,40 @@
+Bug#: 74979
+Product: Mono: Compilers
+Version: 1.0
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: C#
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: bmaurer at users.sf.net               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Problem with switch and break
+
+using System;
+class X {
+	static bool A = true;
+	static char c = 'e';
+	
+	static void Main ()
+	{
+		switch (c) {
+			case 'e': 
+				if (A)
+					break;
+				return;
+			
+			default: 
+				return;
+		}
+		
+		Console.WriteLine ("Good");
+	}
+}
+
+mcs compiled binary outputs nothing. It should output good.


More information about the mono-bugs mailing list