groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul King (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GROOVY-8412) Support !instanceof flow typing for else case
Date Tue, 12 Dec 2017 05:53:00 GMT

    [ https://issues.apache.org/jira/browse/GROOVY-8412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16287165#comment-16287165
] 

Paul King commented on GROOVY-8412:
-----------------------------------

I remove the code which previously treated instanceof and !instanceof the same. But we haven't
put in any support for the negated case as yet.

> 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)

Mime
View raw message