Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0-beta-10
-
None
-
None
Description
given the simple script
test=1
in a file named test.groovy results in an Exception like this one:
Caught: General error during class generation: Cannot use a class expression on the left hand side of an assignment. Node: org.codehaus.groovy.ast.expr.BinaryExpression@1e4457d[org.codehaus.groovy.ast.expr.VariableExpression@18e2b22[variabl
e: test]("=" at 2:5: "=" )org.codehaus.groovy.ast.expr.VariableExpression@b1c5fa[variable: x]]. At [2:5] H:
test.groovy
and much more. Did I use a class on the left hand side? BTW: what is the left hand side? The normal user may not know an answer to these questions. And many don't know you can't have a varibale of the same name as the script name, if no class declaration is used for the script