[Mono-bugs] [Bug 81807][Nor] Changed - Switch on nullable enum produces broken IL code

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Jun 4 18:24:17 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 lars at ahlzen.com.


--- shadow/81807	2007-06-04 18:15:15.000000000 -0400
+++ shadow/81807.tmp.26048	2007-06-04 18:24:17.000000000 -0400
@@ -2,13 +2,13 @@
 Product: Mono: Compilers
 Version: 1.2
 OS: GNU/Linux [Other]
 OS Details: Gentoo
 Status: NEW   
+Severity: Unknown
 Priority: Normal
 Component: C#
 AssignedTo: rharinath at novell.com                            
 ReportedBy: lars at ahlzen.com               
 QAContact: mono-bugs at ximian.com
 TargetMilestone: ---
@@ -59,6 +59,18 @@
 Alive so far...
 Value 1
 Please adjust severity and priority as appropriate.
+------- Additional Comments From lars at ahlzen.com  2007-06-04 18:24 -------
+Another detail worth mentioning... Switching on the nullable's value
+(which you probably want to do most of the time) works as expected:
+In other words, if switch(testEnum) is changed to
+switch(testEnum.Value) you get the expected output:
+lars at saturn ~/projects/wx $ mono ./testcase.exe 
+Alive so far...
+Value 1

More information about the mono-bugs mailing list