[
https://issues.apache.org/jira/browse/GROOVY-7916?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15438338#comment-15438338
]
ASF GitHub Bot commented on GROOVY-7916:
----------------------------------------
GitHub user paulk-asert opened a pull request:
https://github.com/apache/groovy/pull/397
GROOVY-7916: MissingPropertyException when accessing a static inner c…
…lass member from a sub class
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/paulk-asert/groovy groovy7916
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/groovy/pull/397.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #397
----
----
> MissingPropertyException when accessing a static inner class member from a
> sub class
> ------------------------------------------------------------------------------------
>
> Key: GROOVY-7916
> URL: https://issues.apache.org/jira/browse/GROOVY-7916
> Project: Groovy
> Issue Type: Bug
> Components: class generator
> Affects Versions: 2.4.7
> Reporter: Caleb Ott
>
> Run the following code in groovy to get the error.
> {code:java}
> class Base {
> static class Inner {
> static final String CONST = "Hello World";
> }
> }
> class Derived extends Base {
> // empty for this example
> }
> println Derived.Inner.CONST
> {code}
> Error:
> {code}
> Caught: groovy.lang.MissingPropertyException: No such property: Inner for
> class: Derived
> groovy.lang.MissingPropertyException: No such property: Inner for class:
> Derived
> {code}
> This code can be easily converted to Java and in Java everything works as it
> should.
> GROOVY-7762 seems to be a related issue.
> I've verified the issue is on this line...
> {code}println Derived.Inner.CONST{code}
> ...because I tried writing the two classes in Java and still have the same
> issue.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)