Return-Path: X-Original-To: apmail-groovy-notifications-archive@minotaur.apache.org Delivered-To: apmail-groovy-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3FF3017FD5 for ; Mon, 20 Jul 2015 03:30:09 +0000 (UTC) Received: (qmail 13364 invoked by uid 500); 20 Jul 2015 03:30:09 -0000 Delivered-To: apmail-groovy-notifications-archive@groovy.apache.org Received: (qmail 13335 invoked by uid 500); 20 Jul 2015 03:30:09 -0000 Mailing-List: contact notifications-help@groovy.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@groovy.incubator.apache.org Delivered-To: mailing list notifications@groovy.incubator.apache.org Received: (qmail 13326 invoked by uid 99); 20 Jul 2015 03:30:09 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Jul 2015 03:30:09 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id BA8A71A7425 for ; Mon, 20 Jul 2015 03:30:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.97 X-Spam-Level: X-Spam-Status: No, score=0.97 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id nKz-p-OA56FQ for ; Mon, 20 Jul 2015 03:30:05 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with SMTP id CF91E2312D for ; Mon, 20 Jul 2015 03:30:04 +0000 (UTC) Received: (qmail 13292 invoked by uid 99); 20 Jul 2015 03:30:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Jul 2015 03:30:04 +0000 Date: Mon, 20 Jul 2015 03:30:04 +0000 (UTC) From: =?utf-8?Q?C=C3=A9sar_Izurieta_=28JIRA=29?= To: notifications@groovy.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (GROOVY-7511) Static Compilation with explicit EnumMap doesn't use getter MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 C=C3=A9sar Izurieta created GROOVY-7511: -------------------------------------- Summary: Static Compilation with explicit EnumMap doesn't use = getter Key: GROOVY-7511 URL: https://issues.apache.org/jira/browse/GROOVY-7511 Project: Groovy Issue Type: Bug Components: Compiler, Static compilation Affects Versions: 2.4.4 Reporter: C=C3=A9sar Izurieta Assignee: C=C3=A9dric Champeau Priority: Minor When running this code: {code:title=3Dtest.groovy|borderStyle=3Dsolid} @groovy.transform.CompileStatic enum A { X } @groovy.transform.CompileStatic class Test1 { String x =3D "1" def getStringMap() { [ "x": x ] } def getEnumMap() { [ (A.X): x ] } } @groovy.transform.CompileStatic class Test2 extends Test1 { @Override String getX() { return "2" } } def test =3D new Test2() assert test.stringMap["x"] =3D=3D "2" assert test.enumMap[A.X] =3D=3D "2" {code} The second assert fails. The reason seems to be that the {{getEnumMap}} met= hod doesn't call {{this.getX()}} method but {{this.x}} directly. -- This message was sent by Atlassian JIRA (v6.3.4#6332)