Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
4.0.12
-
None
Description
@CompileStatic class Example { public static final String ASDF = 'asdf' @Grab(ASDF + ':asdf:123') // @CompileDynamic void foo() {} }
This produces the familiar Attribute 'value' should have type 'java.lang.String'; but found type 'java.lang.Object' in @groovy.lang.Grab on the annotation value, but applying @CompileDynamic to the method declaration (alongside the non-working annotation!) fixes it.