You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Nikolay Chugunov (JIRA)" <ji...@apache.org> on 2018/03/28 19:12:00 UTC

[jira] [Created] (GROOVY-8523) Static type checking instanceof

Nikolay Chugunov created GROOVY-8523:
----------------------------------------

             Summary: Static type checking instanceof
                 Key: GROOVY-8523
                 URL: https://issues.apache.org/jira/browse/GROOVY-8523
             Project: Groovy
          Issue Type: Bug
          Components: Static compilation, Static Type Checker
    Affects Versions: 2.4.13
            Reporter: Nikolay Chugunov


Now following code failed to compile : 
{code}
@CompileStaticImproved
class Gr {
    void f1(Object obj) {
        if (!(obj instanceof Runnable)) {
            return
        }
        f3(obj) // failed compiled here  : Cannot find matching method Gr#f3(java.lang.Object). 
    }

    void f3(Runnable r) {  }
}
{code}

I have implemented fix and can submit fix, if needed




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)