[jira] [Commented] (GROOVY-8969) Parameter name data is erased when applying traits regardless of --parameters setting

2019-01-25 Thread Paul King (JIRA)


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

Paul King commented on GROOVY-8969:
---

I presume that code in {{TraitComposer}} was written before we added support 
for the {{parameters}} switch. The test suite still passes and behavior seems 
to be expected with pre-compiled code when we simply just copy the parameter 
name. We probably just need to have a suitable workaround (or error) if a 
parameter has name {{$self}}.

> Parameter name data is erased when applying traits regardless of --parameters 
> setting
> -
>
> Key: GROOVY-8969
> URL: https://issues.apache.org/jira/browse/GROOVY-8969
> Project: Groovy
>  Issue Type: Bug
>Affects Versions: 2.5.5
>Reporter: Graeme Rocher
>Priority: Major
>
> When Groovy applies a trait to class it erases parameter name data. You can 
> see this here:
> https://github.com/apache/groovy/blob/982bd38b3216ea3143b0d667d2cd47d2c758f884/src/main/java/org/codehaus/groovy/transform/trait/TraitComposer.java#L157
> So regardless whether `-parameters` is specified to the compiler traits will 
> not retain parameter name information.



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


[jira] [Commented] (GROOVY-8969) Parameter name data is erased when applying traits regardless of --parameters setting

2019-01-24 Thread Graeme Rocher (JIRA)


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

Graeme Rocher commented on GROOVY-8969:
---

Causing https://github.com/micronaut-projects/micronaut-core/issues/1103

> Parameter name data is erased when applying traits regardless of --parameters 
> setting
> -
>
> Key: GROOVY-8969
> URL: https://issues.apache.org/jira/browse/GROOVY-8969
> Project: Groovy
>  Issue Type: Bug
>Affects Versions: 2.5.5
>Reporter: Graeme Rocher
>Priority: Major
>
> When Groovy applies a trait to class it erases parameter name data. You can 
> see this here:
> https://github.com/apache/groovy/blob/982bd38b3216ea3143b0d667d2cd47d2c758f884/src/main/java/org/codehaus/groovy/transform/trait/TraitComposer.java#L157
> So regardless whether `-parameters` is specified to the compiler traits will 
> not retain parameter name information.



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