Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Duplicate
-
Affects Version/s: None
-
Fix Version/s: 1.8.4, 2.0-beta-1
-
Component/s: parser-antlr
-
Labels:None
-
Number of attachments :
Description
The following code:
class Foo {
@Bar({ sleep 1 })
def baz() {}
}
gives this error:
unexpected token: @ at line: 2, column: 3
The error goes away when the argument in enclosed in parens:
class Foo {
@Bar({ sleep(1) })
def baz() {}
}
Any other code changes (like adding explicit closure params) don't help. Class-level annotations don't have this problem. Anyone got an idea what's causing this?