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 2017/02/01 23:17:53 UTC

[jira] [Closed] (GROOVY-7807) CompileStatic doesn't call asBoolean

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

Paul King closed GROOVY-7807.
-----------------------------

> CompileStatic doesn't call asBoolean
> ------------------------------------
>
>                 Key: GROOVY-7807
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7807
>             Project: Groovy
>          Issue Type: Bug
>          Components: Static compilation
>    Affects Versions: 2.4.4
>            Reporter: Johann
>            Assignee: Jochen Theodorou
>
> I have a class that implements asBoolean:
> {code:java}
> class Foo {
>    
>     /**
>      * @return whether any properties are <tt>true</tt>
>      */
>     boolean asBoolean() {
>         foo || bar || keks || blorb
>     }
> }
> {code}
> When using this class in a class that has {{@CompileStatic}} applied to it, the {{asBoolean}} method is not called in a ternary expression.
> May be related to GROOVY-6802.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)