You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2021/10/25 17:30:00 UTC

[jira] [Resolved] (GROOVY-7460) Cannot static import inherited interface members

     [ https://issues.apache.org/jira/browse/GROOVY-7460?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Milles resolved GROOVY-7460.
---------------------------------
    Resolution: Fixed

> Cannot static import inherited interface members
> ------------------------------------------------
>
>                 Key: GROOVY-7460
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7460
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 2.4.3
>            Reporter: Jason Winnebeck
>            Assignee: Eric Milles
>            Priority: Major
>
> {code}
> interface X {
>   static final int CONST = 123
> }
> interface Y extends X {}
> import static Y.*
> println CONST
> {code}
> Expected 123 to printed, but instead get "groovy.lang.MissingPropertyException: No such property: CONST for class: ConsoleScript4"
> Code works if I static import X or if classes are used instead of interfaces. Same error occurs even with @CompileStatic code.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)