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

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

GitHub user jameskleeh opened a pull request:

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

    GROOVY-8872: Populate parameter names from byte code when available

    I'm not sure how to create a test for this. I verified the change works 
locally in the example project I linked and uploaded in the jira issue.
    
    I think adding or modifying a test in AsmDecompilerTest would be the best 
thing, but I'm not sure how to inform Groovy to compile the Java source with 
parameters.

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

    $ git pull https://github.com/jameskleeh/groovy decompiled_param_names

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

    https://github.com/apache/groovy/pull/820.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 #820
    
----
commit b2c31ff4f3a4038d6fbd16a89e2a14e6af4f83c2
Author: jameskleeh <james.kleeh@...>
Date:   2018-11-09T04:44:59Z

    Populate the parameter names from the byte code when available

----


> Decompiled parameter names don't reflect the names in the bytecode
> ------------------------------------------------------------------
>
>                 Key: GROOVY-8872
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8872
>             Project: Groovy
>          Issue Type: Improvement
>          Components: bytecode, Compiler
>    Affects Versions: 2.5.1
>            Reporter: James Kleeh
>            Priority: Critical
>         Attachments: groovy-bug.tar.gz
>
>
> org.codehaus.groovy.ast.Parameter names do not reflect what is stored in the 
> bytecode.
> In this example project, I have 3 projects.
> api - Has a single interface that is compiled with parameters=true
> app - Has a single interface that extends the one in api and is compiled with 
> parameters=true
> processor - Has a single ast transform that fails compilation if any method 
> parameters start with "param"
>  
> The parameter names for the interface in the api project do not reflect the 
> bytecode when compiling the app project
>  
> The runnable example is available here and I've attached it below
> https://github.com/jameskleeh/groovy-ast-bug



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to