[Mono-bugs] [Bug 57747][Wis] Changed - We no do track definite assignment of expressions (12.3.3.23-26)
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Tue, 27 Apr 2004 23:11:45 -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 martin@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=57747
--- shadow/57747 2004-04-27 23:11:21.000000000 -0400
+++ shadow/57747.tmp.29809 2004-04-27 23:11:45.000000000 -0400
@@ -37,6 +37,28 @@
public static void Main() {
F(true,5);
F(false,7);
}
}
+
+------- Additional Comments From martin@ximian.com 2004-04-27 23:11 -------
+using System;
+
+class Test15 {
+ static void F(bool b, int i) {
+ int x;
+ if (b || (x = i) >= 0)
+ // Error: 'x' not definitely assigned
+ Console.WriteLine(x);
+ else
+ // OK: 'x' definitely assigned
+ Console.WriteLine(x);
+ }
+
+ public static void Main() {
+ F(true,5);
+ F(false,7);
+ }
+}
+
+