[Mono-bugs] [Bug 32516][Wis] New - Fall thru case statement works like default:

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
18 Oct 2002 20:37:11 -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 mathias.hasselmann@gmx.de.

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

--- shadow/32516	Fri Oct 18 16:37:11 2002
+++ shadow/32516.tmp.19736	Fri Oct 18 16:37:11 2002
@@ -0,0 +1,51 @@
+Bug#: 32516
+Product: Mono/MCS
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: mathias.hasselmann@gmx.de               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Fall thru case statement works like default:
+
+With mcs-0.16 the fallthru case statements (for strings?) are handled as
+default: branch.
+
+void foo(string attribute)
+{
+     switch(attribute)
+     {
+     case "Modul":
+        do_module();
+        break;
+     case "Funktion":
+        do_function();
+        break;
+     case "Akteure":
+     case "Eingabe":
+     case "Ausgabe":
+        do_attribute(attribute);
+        break;
+     }
+}
+
+
+
+Actual Results:
+
+»foo("Details");« calls »do_attribute("Details");«
+
+Expected Results:
+
+Details should be ignored.
+How often does this happen? 
+
+The problem disappears if »case "Eingabe":« and »case "Ausgabe":« are killed.