Closed otac0n closed 13 years ago
These expressions should be roughly equivalent:
true ? foo="a" : foo="b";
and
foo = true ? "a" : "b";
However, my attempts to resolve this issue have been thwarted by the fact that swaping the binding power of the conditional causes this interpretation:
true ? (foo="a") : (foo="b");
and (foo = true) ? "a" : "b";
Whereas using the binding power of Assignment to read the expression after the colon cause this interpretation:
(true ? foo="a" : foo) = "b";
and foo = (true ? "a" : "b");
I'll look into it asap.
Fixed in commit 0220cabadb919
This case fails:
true ? foo="a" : foo="b"; print(foo);
This case passes:
true ? (foo="a") : (foo="b"); print(foo);