You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (JIRA)" <ji...@apache.org> on 2017/12/11 16:02:00 UTC

[jira] [Created] (GROOVY-8412) Support !instanceof flow typing for else case

Eric Milles created GROOVY-8412:
-----------------------------------

             Summary: Support !instanceof flow typing for else case
                 Key: GROOVY-8412
                 URL: https://issues.apache.org/jira/browse/GROOVY-8412
             Project: Groovy
          Issue Type: Improvement
            Reporter: Eric Milles
            Priority: Minor


{{maybeFile instanceof File ? maybeFile.canonicalPath : maybeFile.toString()}} sees maybeFile as type {{File}} in the true expression.  However, {{!(maybeFile instanceof File) ? maybeFile.toString() : maybeFile.canonicalPath}} does not offer the same support for the else expression.  The same applies if either were written long-form with if/else.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)