[Mono-bugs] [Bug 48962][Nor] New - problem with definite assignment

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 26 Sep 2003 17:15:46 -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 malekith@pld-linux.org.

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

--- shadow/48962	2003-09-26 17:15:46.000000000 -0400
+++ shadow/48962.tmp.3697	2003-09-26 17:15:46.000000000 -0400
@@ -0,0 +1,46 @@
+Bug#: 48962
+Product: Mono/MCS
+Version: unspecified
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: malekith@pld-linux.org               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: problem with definite assignment
+
+Description of Problem:
+mcs screams about unssigned variable, csc from rotor though works
+well. The code also seems OK.
+
+
+Steps to reproduce the problem:
+Compile following program:
+#v+
+class M {
+  public static void Main() {
+	int y, x = 3;
+	if (x > 3) { y = 3; goto end; }
+	return;
+	end: x = y;
+  }
+}
+#v-
+
+
+Actual Results:
+test.cs(6) error CS0165: Use of unassigned local variable `y'
+Compilation failed: 1 error(s), 0 warnings
+
+Expected Results:
+Compilation succeded :)
+
+How often does this happen? 
+Always.