You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Jason Winnebeck (JIRA)" <ji...@apache.org> on 2015/06/08 18:52:00 UTC

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

Jason Winnebeck created GROOVY-7460:
---------------------------------------

             Summary: 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


{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
(v6.3.4#6332)