This is an automated email from the ASF dual-hosted git repository.

emilles pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/master by this push:
     new 98d4e82a07 GROOVY-11612: add test case
98d4e82a07 is described below

commit 98d4e82a074ac7cbd738d0ce1e1953dab7bfd4bb
Author: Eric Milles <[email protected]>
AuthorDate: Sun Apr 13 16:14:56 2025 -0500

    GROOVY-11612: add test case
---
 src/test/gls/innerClass/InnerClassTest.groovy | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/src/test/gls/innerClass/InnerClassTest.groovy 
b/src/test/gls/innerClass/InnerClassTest.groovy
index f28d8d747a..0d72798d9b 100644
--- a/src/test/gls/innerClass/InnerClassTest.groovy
+++ b/src/test/gls/innerClass/InnerClassTest.groovy
@@ -22,7 +22,7 @@ import groovy.test.NotYetImplemented
 import org.codehaus.groovy.control.CompilationFailedException
 import org.codehaus.groovy.control.CompilerConfiguration
 import org.codehaus.groovy.tools.javac.JavaAwareCompilationUnit
-import org.junit.Test
+import org.junit.jupiter.api.Test
 
 import static groovy.test.GroovyAssert.assertScript
 import static groovy.test.GroovyAssert.shouldFail
@@ -2158,6 +2158,24 @@ final class InnerClassTest {
         assert err =~ /No such property: missing for class: Outer.Inner/
     }
 
+    // GROOVY-11612
+    @Test
+    void testNestedPropertyHandling3() {
+        assertScript '''
+            @groovy.transform.CompileStatic
+            class Outer {
+                private final String description
+                Outer(Inner inner) {
+                    this.description = inner.description
+                }
+                static class Inner {
+                    public final String description = 'test'
+                }
+            }
+            assert new Outer(new Outer.Inner()).description == 'test'
+        '''
+    }
+
     // GROOVY-7312
     @Test
     void testInnerClassOfInterfaceIsStatic() {

Reply via email to