[ 
https://issues.apache.org/jira/browse/GROOVY-11207?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eric Milles resolved GROOVY-11207.
----------------------------------
    Fix Version/s: 5.0.0-alpha-3
       Resolution: Fixed

https://github.com/apache/groovy/commit/745e3cd1f97dde3d77e1ab1549804035a2959f41

> 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
>             Fix For: 5.0.0-alpha-3
>
>
> {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)

Reply via email to