Bugzilla – Bug 318856
[PATCH] CS0665 not checked for conditional operator
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by atsushi@ximian.com 2005-08-31 11:26:16 MST ---- mcs reports CS0665 for if statement but not for conditional operator. class Test { public bool Foo (bool x) { bool b; return (b = true) ? true : b; } } Actual Results: no warning. Expected Results: cs0665-2.cs(9,10): warning CS0665: Assignment in conditional expression is always constant; did you mean to use == instead of = ? The fix is attached. ---- Additional Comments From atsushi@ximian.com 2005-08-31 11:26:43 MST ---- Created an attachment (id=168439) proposed fix ---- Additional Comments From rharinath@novell.com 2005-09-01 04:54:57 MST ---- Patch looks good. Please apply. ---- Additional Comments From atsushi@ximian.com 2005-09-01 07:30:22 MST ---- done (r49256). Imported an attachment (id=168439) Unknown operating system unknown. Setting to default OS "Other".