[Mono-bugs] [Bug 44731][Nor] New - Implicit conversion in switch statements should error out

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Fri, 13 Jun 2003 09:32:25 -0400 (EDT)


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 mkestner@ximian.com.

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

--- shadow/44731	Fri Jun 13 09:32:25 2003
+++ shadow/44731.tmp.6732	Fri Jun 13 09:32:25 2003
@@ -0,0 +1,36 @@
+Bug#: 44731
+Product: Mono/MCS
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: mkestner@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Implicit conversion in switch statements should error out
+
+The following example:
+
+public class Foo {
+  public void Bar ()
+  {
+    uint my_uint_var;
+    ...
+    switch (my_uint_var) {
+    case MyEnumType.MyValue:
+      break;
+    default:
+      break;
+    }
+  }
+}
+
+errors out on csc due to an invalid implicit conversion from uint to
+enumerated type.  mcs compiles without error.