[Mono-bugs] [Bug 28717][Nor] New - problem with the definite assignment checks
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
8 Aug 2002 09:02:37 -0000
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 lupus@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=28717
--- shadow/28717 Thu Aug 8 05:02:37 2002
+++ shadow/28717.tmp.15692 Thu Aug 8 05:02:37 2002
@@ -0,0 +1,40 @@
+Bug#: 28717
+Product: Mono/MCS
+Version: unspecified
+OS: other
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: lupus@ximian.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: problem with the definite assignment checks
+
+The following program doesn't compile with mcs:
+unassigned.cs(13) error CS0165: Use of unassigned local variable `value'
+Compilation failed: 1 error(s), 0 warnings
+It works ok with csc.
+class T {
+ static void Main() {
+ int value;
+
+ for (int i = 0; i < 5; ++i) {
+ if (i == 0) {
+ continue;
+ } else if (i == 1) {
+ value = 2;
+ } else {
+ value = 0;
+ }
+ if (value > 0)
+ return;
+ }
+ return;
+ }
+}