[Mono-bugs] [Bug 69195][Nor] Changed - variable assignation for CS0165 incorrectly computed on conditional expressions
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Wed, 1 Dec 2004 06:45:00 -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 atsushi@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=69195
--- shadow/69195 2004-12-01 06:18:07.000000000 -0500
+++ shadow/69195.tmp.3140 2004-12-01 06:45:00.000000000 -0500
@@ -52,6 +52,23 @@
Because
(s = "")
is performed everytime => value is assigned.
+
+------- Additional Comments From atsushi@ximian.com 2004-12-01 06:45 -------
+if (0 == 1 && (s = "") == "a" || s == "")
+
+is parsed as
+
+if (
+ 0 == 1
+ &&
+ (s = "") == "a"
+ ||
+ s == ""
+)
+
+Here, since 0 == 1 can never be true (in other cases, it *might* be
+true), then by the definition of && operator, the following [(s = "")
+== "a"] will never be (in other cases, it *might not be) executed.