[ https://issues.apache.org/jira/browse/GROOVY-6803?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles updated GROOVY-6803: -------------------------------- Fix Version/s: 2.5.22 > CompileStatic: ListAssignment for String takes precendence over Coercion when > statically compiling > -------------------------------------------------------------------------------------------------- > > Key: GROOVY-6803 > URL: https://issues.apache.org/jira/browse/GROOVY-6803 > Project: Groovy > Issue Type: Bug > Components: Static compilation > Affects Versions: 2.4.0-rc-1 > Reporter: Thibault Kruse > Assignee: Eric Milles > Priority: Major > Fix For: 4.0.0-beta-2, 3.0.10, 2.5.22 > > > May or may not be a bug, to be decided. > Also see http://jira.codehaus.org/browse/GROOVY-6802 > To reproduce: > import groovy.transform.CompileStatic > {code}@CompileStatic > class Foo { > def static main(String[] args) { > String b = ["foo"] > assert b == "[foo]" > } > }{code} > Assumption: This should succeed, List probably should be coerced into String > via toString() as is done without @CompileStatic. -- This message was sent by Atlassian Jira (v8.20.10#820010)