[
https://issues.apache.org/jira/browse/GROOVY-11207?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Milles reassigned GROOVY-11207:
------------------------------------
Assignee: Eric Milles
> STC rejects concatenated string as annotation parameter
> -------------------------------------------------------
>
> Key: GROOVY-11207
> URL: https://issues.apache.org/jira/browse/GROOVY-11207
> Project: Groovy
> Issue Type: Bug
> Components: Static Type Checker
> Affects Versions: 4.0.12
> Reporter: Christopher Smith
> Assignee: Eric Milles
> Priority: Major
>
> {code:groovy}
> @CompileStatic
> class Example {
> public static final String ASDF = 'asdf'
> @Grab(ASDF + ':asdf:123')
> // @CompileDynamic
> void foo() {}
> }
> {code}
> 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.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)