Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 2.7.2.Release
-
Component/s: Editor, Formatting
-
Labels:None
-
Number of attachments :
Description
After formatting the following script:
def test() {
[
1,
2,
3
] as Object[]
}
The following source is produced:
def test() {
[
1,
2,
3
]
as Object[]
}
The error is on as Object[] with the message Groovy:unexpected token: as @ line 9, column 5
Something that might help to debug this is the following:
def f() { if (true) println 1 1.each { 1.each { [ 1 ] as List } } }Formatting the above moves the println 1 call to the same indent as the if. I was able to narrow things down to this structure based on a real class of mine.