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

Eric Milles commented on GROOVY-8219:
-------------------------------------

Yes, I’d just open a new issue ticket and note what it does if it’s more than 
the noted results. 

> Add @TupleConstructor(includeFields = true) to a class implements a trait 
> which contains properties will cause NPE
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-8219
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8219
>             Project: Groovy
>          Issue Type: Bug
>          Components: xforms
>    Affects Versions: 2.4.11
>            Reporter: Huabin Zhang
>            Assignee: Eric Milles
>            Priority: Major
>              Labels: breaking, trait, traits
>             Fix For: 5.0.0-alpha-1
>
>
> Hi, guys:
> I got NPE when I wrote the following codes:
> {code:java|title=Groovy Script|borderStyle=solid}
> trait T {
>     def x = 'abc'
> }
> import groovy.transform.TupleConstructor
> @TupleConstructor(includeFields = true)
> class A implements T {
>     def a
>     private b
> }
> assert 'ABC' == new A().x.toUpperCase()
> {code}
> I found that it will works well if I remove {{(includefields = true)}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to