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 1E583200B9A for ; Fri, 7 Oct 2016 16:48:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 1CD47160AE8; Fri, 7 Oct 2016 14:48: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 60149160AD6 for ; Fri, 7 Oct 2016 16:48:21 +0200 (CEST) Received: (qmail 28987 invoked by uid 500); 7 Oct 2016 14:48: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 28975 invoked by uid 99); 7 Oct 2016 14:48:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Oct 2016 14:48:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 721E32C0087 for ; Fri, 7 Oct 2016 14:48:20 +0000 (UTC) Date: Fri, 7 Oct 2016 14:48:20 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: notifications@groovy.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (GROOVY-7951) MethodCallExpression.transformExpression does not copy generic types MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 07 Oct 2016 14:48:22 -0000 [ https://issues.apache.org/jira/browse/GROOVY-7951?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15555271#comment-15555271 ] ASF GitHub Bot commented on GROOVY-7951: ---------------------------------------- GitHub user jwagenleitner opened a pull request: https://github.com/apache/groovy/pull/441 GROOVY-7951: MethodCallExpression.transformExpression does not copy generic types PR created from patch supplied in [GROOVY-7951](https://issues.apache.org/jira/browse/GROOVY-7951). It seems like a reasonable change to make, though I did have trouble thinking up a way to test it that would be meaningful. If anyone can nudge me in the right direction I can try to write up a test if you think it's warranted in this case. I considered whether `genericsTypes.clone()` should be used, but it didn't seem to be common and most uses of the array seem to be read only. You can merge this pull request into a Git repository by running: $ git pull https://github.com/jwagenleitner/groovy GROOVY-7951 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/groovy/pull/441.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 #441 ---- commit 76f9cdabd6e48baf5721b6b6dbff21a109f164a7 Author: John Wagenleitner Date: 2016-10-04T22:29:59Z GROOVY-7951: MethodCallExpression.transformExpression does not copy generic types ---- > MethodCallExpression.transformExpression does not copy generic types > -------------------------------------------------------------------- > > Key: GROOVY-7951 > URL: https://issues.apache.org/jira/browse/GROOVY-7951 > Project: Groovy > Issue Type: Bug > Components: ast builder > Affects Versions: 2.4.7 > Reporter: Eric Milles > Priority: Minor > > org.codehaus.groovy.ast.expr.MethodCallExpression.transformExpression(ExpressionTransformer) is not copying generics info. Downstream visitors are unable to check generics on static calls like Collections.emptyList(). > My patched version: > {code:java} > public Expression transformExpression(ExpressionTransformer transformer) { > MethodCallExpression answer = > new MethodCallExpression(transformer.transform(objectExpression), transformer.transform(method), transformer.transform(arguments)); > answer.setSafe(safe); > answer.setSpreadSafe(spreadSafe); > answer.setImplicitThis(implicitThis); > // GRECLIPSE add > answer.setGenericsTypes(genericsTypes); > // GRECLIPSE end > answer.setMethodTarget(target); > answer.setSourcePosition(this); > answer.copyNodeMetaData(this); > return answer; > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)