[Mono-bugs] [Bug 33094][Wis] Changed - C# switch statement fails to compile.

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
31 Oct 2002 11:51:55 -0000


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 david_stephenson@hp.com.

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

--- shadow/33094	Thu Oct 31 06:50:50 2002
+++ shadow/33094.tmp.17020	Thu Oct 31 06:51:55 2002
@@ -1,14 +1,14 @@
 Bug#: 33094
 Product: Mono/MCS
 Version: unspecified
-OS: 
+OS: unknown
 OS Details: 
 Status: NEW   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Wishlist
 Component: Misc
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: david_stephenson@hp.com               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
@@ -93,6 +93,31 @@
 
 
 ------- Additional Comments From david_stephenson@hp.com  2002-10-31 06:50 -------
 Created an attachment (id=2684)
 This is the version which fails (the first attachment works ok)
 
+
+------- Additional Comments From david_stephenson@hp.com  2002-10-31 06:51 -------
+Sorry (to much cutting and pasting!) 
+this is the version which does not build (spot the difference!)
+
+public static void test(int p) {
+	int elementDepth = 0;
+
+	switch(p){             
+	case 2:
+		elementDepth++;  // hint If I remove this line it 
+compiles with half the errors!
+		int ascii = 0;
+		int nonAscii = 0;
+		break;
+	case 3:
+		ascii = 0;
+		nonAscii = 0;
+		ascii++;
+		nonAscii++;
+		System.Console.WriteLine(ascii);
+		System.Console.WriteLine(nonAscii);
+		break;
+	}
+}