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 2023/05/02 05:55:00 UTC

[jira] [Created] (GROOVY-11041) Incorrect property handling for records

Paul King created GROOVY-11041:
----------------------------------

             Summary: Incorrect property handling for records
                 Key: GROOVY-11041
                 URL: https://issues.apache.org/jira/browse/GROOVY-11041
             Project: Groovy
          Issue Type: Bug
            Reporter: Paul King


While it is not normal to override record component getters, it is perfectly allowable.

 

The following record is getting both an "x()" method and a "getX()" method. The supplied "x()" method isn't being associated correctly with the property.
{code:java}
record Foo(String x, String y) {
    String x() {
        'z'
    }
} {code}



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