[ https://issues.apache.org/jira/browse/GROOVY-6802?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles updated GROOVY-6802: -------------------------------- Fix Version/s: 2.5.22 > CompileStatic: ListAssignment takes precedence over Coercion when statically > compiling > -------------------------------------------------------------------------------------- > > Key: GROOVY-6802 > URL: https://issues.apache.org/jira/browse/GROOVY-6802 > 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 > > > Observed on 2.2.2, but maybe affects all releases. To reproduce: > import groovy.transform.CompileStatic > {code}@CompileStatic > class Foo { > def static main(String[] args) { > boolean b = [false] > assert b > } > }{code} > fails, but should succeed given List should be coerced to Boolean via > asBoolean() > Also see discussion at > http://comments.gmane.org/gmane.comp.lang.groovy.user/64604 -- This message was sent by Atlassian Jira (v8.20.10#820010)