[ 
https://issues.apache.org/jira/browse/GROOVY-6831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15502102#comment-15502102
 ] 

ASF GitHub Bot commented on GROOVY-6831:
----------------------------------------

GitHub user paulk-asert opened a pull request:

    https://github.com/apache/groovy/pull/425

    GROOVY-6831: Access to static fields/properties from within inner cla…

    …sses is inconsistent

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/paulk-asert/groovy groovy6831b

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/groovy/pull/425.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 #425
    
----
commit 6aa91bb2cb3d31a2e28a7a271f330b798047e0b9
Author: paulk <pa...@asert.com.au>
Date:   2016-09-19T02:53:15Z

    GROOVY-6831: Access to static fields/properties from within inner classes 
is inconsistent

----


> Access to static fields/properties from within inner classes is inconsistent
> ----------------------------------------------------------------------------
>
>                 Key: GROOVY-6831
>                 URL: https://issues.apache.org/jira/browse/GROOVY-6831
>             Project: Groovy
>          Issue Type: Bug
>            Reporter: Paul King
>
> Misbehaves in the same way regardless of @CompileStatic:
> {code}
> import java.util.logging.Logger
> //@groovy.transform.CompileStatic
> class Foo {
>   private static final transient Logger log = 
> Logger.getLogger(Foo.class.getName()) 
>   void method() {
>     log.info('some info')
>   }
>   static class Bar {
>     void method() {
>       log.info('some inner info')
>     }
>     static class Baz {
>        void method() {
>         log.info('some inner inner info')
>       }
>     }
>   }
> }
> new Foo().method() // => INFO: some info
> new Foo.Bar().method() // => INFO: some inner info
> new Foo.Bar.Baz().method() // => groovy.lang.MissingPropertyException: No 
> such property: log for class: Foo$Bar
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to