[Mono-bugs] [Bug 81495][Min] Changed - return should be like throw in not requiring a break afterwards in a switch

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Apr 30 14:54:44 EDT 2007


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 vgiszpenc at dsci.com.

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

--- shadow/81495	2007-04-30 14:10:10.000000000 -0400
+++ shadow/81495.tmp.15011	2007-04-30 14:54:44.000000000 -0400
@@ -1,12 +1,12 @@
 Bug#: 81495
 Product: Mono: Compilers
 Version: 1.2
 OS: All
 OS Details: 
-Status: NEEDINFO   
+Status: REOPENED   
 Resolution: 
 Severity: Unknown
 Priority: Minor
 Component: C#
 AssignedTo: rharinath at novell.com                            
 ReportedBy: vgiszpenc at dsci.com               
@@ -48,6 +48,39 @@
 
 How often does this happen? 
 Always
 
 ------- Additional Comments From gert.driesen at pandora.be  2007-04-30 14:10 -------
 This works fine here. What version of Mono (or mcs) are you using ?
+
+------- Additional Comments From vgiszpenc at dsci.com  2007-04-30 14:54 -------
+Mono JIT compiler version 1.2.3.1, (C) 2002-2006 Novell, Inc and
+Contributors. www.mono-project.com
+        TLS:           normal
+        GC:            Included Boehm (with typed GC)
+        SIGSEGV:       normal
+        Architecture:  x86
+        Disabled:      none
+
+
+I am using the OpenSuse 10.2 VM on the Mono download site.
+Note that the code I posted should GIVE A WARNING.  Try the following
+code to get an error:
+
+class foo
+{
+  int bar(int i)
+  {
+    switch(i)
+    {
+      case 1:
+        return 1;
+        //unreachable code but compiler requires a break statement
+      default:
+        throw new Exception();
+        //no break needed here Yippee
+    }
+  }
+}
+
+
+


More information about the mono-bugs mailing list