Only return complete accessor name when accessor has a backing field

This commit is contained in:
Moritz Halbritter
2023-01-18 13:42:56 +01:00
parent 26d658802f
commit 524a4b6c1e
2 changed files with 19 additions and 1 deletions

View File

@@ -168,7 +168,7 @@ class TypeElementMembers {
}
private String getAccessorName(String methodName) {
if (this.isRecord) {
if (this.isRecord && this.fields.containsKey(methodName)) {
return methodName;
}
String name;