Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.0-beta-2
-
Fix Version/s: 1.0-beta-3
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
After a subscript operator is encountered, expression evaluation seems to stop.
For example, if we have the following map:
a = ['out1':['in1':1, 'in2':2], 'out2':3]
The following expression evaluates correctly to 1:
a.out1.in1
This expression evaluates to null:
a['out1'].in1
And this evaluates to ["in1"]:
a['out1']['in1']
The same thing happens when using the subscript operator on a List of Java objects; the expression fails to evaluate correctly after the first subscript operator is encountered.
This problem also affects slicing. For example, currently the following cannot be done:
a = [1,2,3,4,5]
{ println( it ) }a[2..3].each