You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/04/02 05:22:00 UTC

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

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

ASF GitHub Bot commented on GROOVY-8523:
----------------------------------------

GitHub user nikchugunov opened a pull request:

    https://github.com/apache/groovy/pull/680

    GROOVY-8523 Static type checking instanceof_not

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/nikchugunov/groovy master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/groovy/pull/680.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #680
    
----
commit ada5660cea287e19543de2133b270272d0c9b329
Author: venkato <ve...@...>
Date:   2018-04-01T20:13:23Z

    GROOVY-8523 Static type checking instanceof

commit e63447e6c75754bef21507264703993d6496c16d
Author: venkato <ve...@...>
Date:   2018-04-01T20:17:06Z

    GROOVY-8523 Static type checking instanceof

commit 250bc0d3e4606f3e3ebcc3f1231ddcf4b5c89dee
Author: venkato <ve...@...>
Date:   2018-04-02T05:58:00Z

    GROOVY-8523 Static type checking instanceof

commit 1c220beb02fc5be3626f961e311a1dece82636bf
Author: venkato <ve...@...>
Date:   2018-04-02T06:18:06Z

    GROOVY-8523 Static type checking instanceof

----


> 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
>            Priority: Minor
>
> Now following code failed to compile : 
> {code}
> @CompileStatic
> 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.
> Idea doesn't highlight this code as error, but groovy compiler failed.



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