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 06:40:00 UTC

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

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

Paul King resolved GROOVY-9825.
-------------------------------
    Fix Version/s: 4.0.0-alpha-2
                   3.0.7
                   2.5.14
       Resolution: Fixed

Proposed PR merged.

> 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
>            Priority: Major
>             Fix For: 2.5.14, 3.0.7, 4.0.0-alpha-2
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> 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)