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/07/26 04:39:11 UTC
[jira] [Closed] (GROOVY-8389) Static import of a property messes
with instance method
[ https://issues.apache.org/jira/browse/GROOVY-8389?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King closed GROOVY-8389.
-----------------------------
> Static import of a property messes with instance method
> -------------------------------------------------------
>
> Key: GROOVY-8389
> URL: https://issues.apache.org/jira/browse/GROOVY-8389
> Project: Groovy
> Issue Type: Bug
> Components: Static compilation, Static Type Checker
> Affects Versions: 2.5.0-beta-2, 2.4.13
> Reporter: Daniil Ovchinnikov
> Assignee: Daniel Sun
> Priority: Major
> Fix For: 2.5.1, 3.0.0-alpha-4, 2.6.0-alpha-5
>
>
> {code:title=bugs.groovy}
> import static A.bar
> class A {
> static bar = "A"
> }
> def bar() {
> "bar"
> }
> @groovy.transform.CompileStatic
> def usage() {
> bar()
> }
> println usage()
> {code}
> {noformat}
> 13: [Static type checking] - Cannot find matching method A#bar(). Please check if the declared type is right and if the method exists.
> @ line 13, column 3.
> bar()
> ^
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)