[Mono-bugs] [Bug 54987][Maj] New - MCS incorrectly handles "null" in switch() statement

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sat, 28 Feb 2004 15:29:07 -0500 (EST)


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 jaak@zd.com.pl.

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

--- shadow/54987	2004-02-28 15:29:07.000000000 -0500
+++ shadow/54987.tmp.23524	2004-02-28 15:29:07.000000000 -0500
@@ -0,0 +1,53 @@
+Bug#: 54987
+Product: Mono/Compilers
+Version: unspecified
+OS: Fedora 1.0
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: jaak@zd.com.pl               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: MCS incorrectly handles "null" in switch() statement
+
+Description of Problem:
+
+MCS incorrectly compiles switch () statement on string types. 
+
+It fails at runtime when the "switched" value is null. Despite the
+"default" clause, the appropriate branch is not executed at all.
+
+Steps to reproduce the problem:
+
+1. Compile the attached problem using MCS.
+
+Actual Results:
+
+MS
+MS
+MS
+PostgreSQL
+PostgreSQL
+
+Expected Results:
+
+MS
+MS
+MS
+PostgreSQL
+PostgreSQL
+MS
+
+How often does this happen? 
+
+100%
+
+Additional Information:
+
+When compiled with csc.exe - it runs without a problem.