Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: None
-
Fix Version/s: 1.1-beta-2
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
Cannot parse:
if (a = false) println "xx"
but can parse:
if ((a = false)) println "xx"
Of course this is a useless statement, but it also fails with any boolean-values expression substituted for "false".
this is no bug, this is by design. As we allow every object to be evaluated to a boolean we decided to not to allow the assignment if it is not in (). It's just a very simple case to avoid the fear known from C.