You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2016/08/17 14:24:20 UTC

[jira] [Updated] (GROOVY-6802) CompileStatic: ListAssignment takes precedence over Coercion when statically compiling

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

Paul King updated GROOVY-6802:
------------------------------
    Summary: CompileStatic: ListAssignment takes precedence over Coercion when statically compiling  (was: CompileStatic: ListAssignment takes precendence over Coercion when statically compiling)

> 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
>
> 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
(v6.3.4#6332)