Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6BA96200B84 for ; Tue, 20 Sep 2016 08:56:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6A372160ADE; Tue, 20 Sep 2016 06:56:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D4E2F160AC9 for ; Tue, 20 Sep 2016 08:56:21 +0200 (CEST) Received: (qmail 39682 invoked by uid 500); 20 Sep 2016 06:56:20 -0000 Mailing-List: contact notifications-help@groovy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@groovy.apache.org Delivered-To: mailing list notifications@groovy.apache.org Received: (qmail 39654 invoked by uid 99); 20 Sep 2016 06:56:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Sep 2016 06:56:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 970352C2A6D for ; Tue, 20 Sep 2016 06:56:20 +0000 (UTC) Date: Tue, 20 Sep 2016 06:56:20 +0000 (UTC) From: "Paul King (JIRA)" To: notifications@groovy.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (GROOVY-6831) Access to static fields/properties from within nested classes is inconsistent MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 20 Sep 2016 06:56:22 -0000 [ https://issues.apache.org/jira/browse/GROOVY-6831?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul King resolved GROOVY-6831. ------------------------------- Resolution: Fixed Assignee: Paul King Fix Version/s: 2.4.8 Proposed PR merged. > Access to static fields/properties from within nested classes is inconsistent > ----------------------------------------------------------------------------- > > Key: GROOVY-6831 > URL: https://issues.apache.org/jira/browse/GROOVY-6831 > Project: Groovy > Issue Type: Bug > Reporter: Paul King > Assignee: Paul King > Fix For: 2.4.8 > > > 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)