You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Daniel Sun (Jira)" <ji...@apache.org> on 2019/11/21 08:49:00 UTC

[jira] [Resolved] (GROOVY-8686) STC: type inferencing for (a instanceof C && a...) bleeds into enclosing scope

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

Daniel Sun resolved GROOVY-8686.
--------------------------------
    Fix Version/s: 3.0.0-rc-2
       Resolution: Fixed

> STC: type inferencing for (a instanceof C && a...) bleeds into enclosing scope
> ------------------------------------------------------------------------------
>
>                 Key: GROOVY-8686
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8686
>             Project: Groovy
>          Issue Type: Bug
>          Components: Static Type Checker
>    Affects Versions: 2.4.16, 3.0.0-alpha-4, 2.5.6
>            Reporter: Eric Milles
>            Assignee: Eric Milles
>            Priority: Major
>             Fix For: 3.0.0-rc-2
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Expecting type checking error for the following:
> {code:groovy}
> @groovy.transform.TypeChecked
> def m(def obj) {
>   def isA = (obj instanceof String && obj.equalsIgnoreCase('a'))
>   obj.toLowerCase() // should be STC error; if above line is commented out, error shows
> }
> {code}
> Same for {{@CompileStatic}}.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)