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 2020/11/23 05:06:00 UTC

[jira] [Created] (GROOVY-9825) interface constants from super interfaces lost in some contexts

Paul King created GROOVY-9825:
---------------------------------

             Summary: interface constants from super interfaces lost in some contexts
                 Key: GROOVY-9825
                 URL: https://issues.apache.org/jira/browse/GROOVY-9825
             Project: Groovy
          Issue Type: Bug
            Reporter: Paul King
            Assignee: Paul King


This script:

{code}
class Baz {
    static void main(args) {
        println new Inner().inner()
    }
    static class Inner implements Bar {
        def inner() {
            FOO
        }
    }
}

interface Foo {
    int FOO = 1
}

interface Bar extends Foo {
    int BAR = 3
}
{code}

Fails with:

{noformat}
Apparent variable 'FOO' was found in a static scope but doesn't refer to a local variable, static field or class...
{noformat}

Looks like an unintended side effect of fixing GROOVY-9598:

https://github.com/apache/groovy/commit/fc5de1cf3ce6



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