Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.8-beta-2
-
Fix Version/s: 1.8-beta-3
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
@Field cannot annotate a multiple assignment expression. throws a ClassCastException
This was found become because DeclarationExpression.getVariableExpression() was deprecated.
A failing test case is:
@groovy.transform.Field
def (awe, awe2) = [[1, 2, 3], [1, 2, 3]]
def awesum() { awe.sum() }
assert awesum() == 6
I have removed the ClassCastException with a compile time error saying that the multiple assignment isn't currently supported. We now need to decide if we want to support that form.