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 2017/02/01 23:19:07 UTC

[jira] [Closed] (GROOVY-7917) Sub class can't override final static property

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

Paul King closed GROOVY-7917.
-----------------------------

> Sub class can't override final static property
> ----------------------------------------------
>
>                 Key: GROOVY-7917
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7917
>             Project: Groovy
>          Issue Type: Bug
>          Components: class generator
>    Affects Versions: 2.4.7
>            Reporter: Caleb Ott
>            Assignee: Paul King
>             Fix For: 2.4.8
>
>
> Running the code below, "Derived Class" is expected to be printed out, but instead "Base Class" is printed.
> {code:java}
> class Base {
>     static final String CONST = "Base Class"
> }
> class Derived extends Base {
>     static final String CONST = "Derived Class"
> }
> println Derived.CONST
> {code}
> When writing this same code in Java, "Derived Class" is properly printed out.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)