[ https://issues.apache.org/jira/browse/GROOVY-9855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles updated GROOVY-9855: -------------------------------- Fix Version/s: 2.5.16 > Compiler does not resolve compile-time constants in string concatenation > ------------------------------------------------------------------------ > > Key: GROOVY-9855 > URL: https://issues.apache.org/jira/browse/GROOVY-9855 > Project: Groovy > Issue Type: Bug > Components: Compiler, Static compilation > Affects Versions: 3.0.7 > Reporter: Christopher Smith > Assignee: Eric Milles > Priority: Minor > Fix For: 3.0.8, 4.0.0-alpha-3, 2.5.16 > > Time Spent: 1h > Remaining Estimate: 0h > > {code:groovy} > @Qualifier(ConfigProps.PREFIX + '.suffix') > @CompileStatic > class ConfigProps { > public static final String PREFIX = 'prefix' > } > {code} > In this case, the value ({{prefix.suffix}}) is a compile-time constant and > should be available as an annotation parameter, but the compiler does not > recognize this. Both plain and static compilation produce errors, though > different errors: > dynamic: > {code} > The value for annotation attribute Qualifier.value must be a constant > expression > {code} > static: > {code} > Attribute 'value' should have type 'java.lang.String'; but found type > 'java.lang.Object' > {code} -- This message was sent by Atlassian Jira (v8.20.1#820001)