You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (Jira)" <ji...@apache.org> on 2024/03/05 03:05:00 UTC

[jira] [Updated] (GROOVY-11329) Class using trait and @Immutable and allProperties gives BUG! exception in phase 'canonicalization' NPE

     [ https://issues.apache.org/jira/browse/GROOVY-11329?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul King updated GROOVY-11329:
-------------------------------
    Description: 
{code}
import groovy.transform.Immutable

trait T {
    String foo
}

@Immutable(allProperties=true)
class C implements T {
    String bar
}

assert new C('bar', 'foo').toString() == 'C(bar, foo)'
{code}
Gives:
{noformat}
BUG! exception in phase 'canonicalization' in source unit 'ConsoleScript0' unexpected NullPointerException
{noformat}


> Class using trait and @Immutable and allProperties gives BUG! exception in phase 'canonicalization' NPE
> -------------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-11329
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11329
>             Project: Groovy
>          Issue Type: Bug
>            Reporter: Paul King
>            Assignee: Paul King
>            Priority: Major
>
> {code}
> import groovy.transform.Immutable
> trait T {
>     String foo
> }
> @Immutable(allProperties=true)
> class C implements T {
>     String bar
> }
> assert new C('bar', 'foo').toString() == 'C(bar, foo)'
> {code}
> Gives:
> {noformat}
> BUG! exception in phase 'canonicalization' in source unit 'ConsoleScript0' unexpected NullPointerException
> {noformat}



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