Eric Milles created GROOVY-11639:
------------------------------------

             Summary: interface extends interface and uses static field in 
default method
                 Key: GROOVY-11639
                 URL: https://issues.apache.org/jira/browse/GROOVY-11639
             Project: Groovy
          Issue Type: Bug
    Affects Versions: 5.0.0-alpha-12
            Reporter: Eric Milles
            Assignee: Eric Milles


Consider the following:
{code:groovy}
interface I {
  String FOO = 'foo'
}
interface J extends I {
  default String dm() {
    FOO + 'bar'
  }
}
class C implements J {
  def m() {
    dm() + 'baz'
  }
}

assert new C().m() == 'foobarbaz'
{code}

{code}
groovy.lang.MissingPropertyException: No such property: FOO for class: C
        at J.dm(Groovy10312.groovy:6)
        at C.m(Groovy10312.groovy:11)
        at Groovy11xxx.run(Groovy10312.groovy:15)
{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to