groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GROOVY-8157) Flow typing doesn't work with assignment to a parameter
Date Thu, 11 May 2017 06:08:04 GMT

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

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

Github user asfgit closed the pull request at:

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


> Flow typing doesn't work with assignment to a parameter
> -------------------------------------------------------
>
>                 Key: GROOVY-8157
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8157
>             Project: Groovy
>          Issue Type: Bug
>          Components: Static Type Checker
>    Affects Versions: 2.4.10
>            Reporter: Daniil Ovchinnikov
>
> {code}
> import groovy.transform.CompileStatic
> class A {}
> class B extends A { def bbb() {} }
> @CompileStatic
> def fooLocalAssignment() {
>     A a = new B()
>     a.bbb()
> }
> @CompileStatic
> def fooParameterAssignment(A a) {
>     a = new B() 
>     a.bbb() // Cannot find matching method A#bbb()
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message