What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

------- Comment #2 from  2008-12-21 11:49 -------
It works as designed. It is designed to avoid mistakes.

"if (var = expr) {" is disallowed on purpose to avoid mistakes where you
inteded to write "if (var == expr) {":

int a = ...;
if (a = 42) { // oops, what a typo! I ment if (a == 42) here...

Bool is no different from int in this expression.

However, "if (type var == expression) {" is not a valid construct, so there is
no chance to make a mistake and thus "if (type var = expression) {" is allowed.

There is no 'special cases' for bools.


Reply via email to