From 0f89ba07f86cde55b4d9bc0eb0cb8e6f0813d7be Mon Sep 17 00:00:00 2001 From: lingenj Date: Thu, 19 Dec 2024 14:27:09 +0100 Subject: [PATCH] Add `attributeWithParentheses` --- .../openrewrite/groovy/tree/AttributeTest.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/rewrite-groovy/src/test/java/org/openrewrite/groovy/tree/AttributeTest.java b/rewrite-groovy/src/test/java/org/openrewrite/groovy/tree/AttributeTest.java index bfbadb76655..8c5ae847d02 100644 --- a/rewrite-groovy/src/test/java/org/openrewrite/groovy/tree/AttributeTest.java +++ b/rewrite-groovy/src/test/java/org/openrewrite/groovy/tree/AttributeTest.java @@ -35,4 +35,19 @@ void usingGroovyNode() { ) ); } + + @Test + void attributeWithParentheses() { + rewriteRun( + groovy( + """ + class User { + public final String name + User(String name) { this.name = name} + } + (new User("henk").@name) == 'henk' + """ + ) + ); + } }