Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
None
-
None
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?