You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2018/03/06 23:15:02 UTC
[jira] [Closed] (GROOVY-8157) Flow typing doesn't work with
assignment to a parameter
[ https://issues.apache.org/jira/browse/GROOVY-8157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King closed GROOVY-8157.
-----------------------------
> 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
> Assignee: Shil Sinha
> Priority: Major
> Fix For: 2.4.12
>
>
> {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
(v7.6.3#76005)