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

Eric Milles reassigned GROOVY-11206:
------------------------------------

    Assignee: Eric Milles

> Concatenated strings not treated as compile-time constants
> ----------------------------------------------------------
>
>                 Key: GROOVY-11206
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11206
>             Project: Groovy
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions: 4.0.12
>            Reporter: Christopher Smith
>            Assignee: Eric Milles
>            Priority: Major
>
> This problem was marked fixed with GROOVY-9855, but I'm seeing (a variant 
> of?) it again:
> {code:groovy}
> @Grab(Example.CONSTANT)
> // ^ The value for annotation attribute Grab.value must be a constant 
> expression
> class Example {
>   public static final String GROUP = 'asdf'
>   public static final String CONSTANT = GROUP + ':asdf:0.1'
> }
> {code}
> In case it's relevant, the non-minimal case involves a statically imported 
> constant from another class:
> {code:groovy}
> class MyController {
>   public static final String PARAM_OWNER = 'filter[' + REL_OWNER + ']'
>   @GetMapping(params = PARAM_OWNER)
>   // ^ Expected 'PARAM_OWNER' to be an inline constant of type 
> java.lang.String not a field expression in 
> @org.springframework.web.bind.annotation.GetMapping
>   ...
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to