This is an automated email from the ASF dual-hosted git repository.
emilles pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/GROOVY_4_0_X by this push:
new b78a0832c7 GROOVY-11612: add test case
b78a0832c7 is described below
commit b78a0832c77e415f075d065088560e8a8eed7dc3
Author: Eric Milles <[email protected]>
AuthorDate: Sun Apr 13 15:39:13 2025 -0500
GROOVY-11612: add test case
---
src/test/gls/innerClass/InnerClassTest.groovy | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/src/test/gls/innerClass/InnerClassTest.groovy
b/src/test/gls/innerClass/InnerClassTest.groovy
index 710cd95ff3..148a562bea 100644
--- a/src/test/gls/innerClass/InnerClassTest.groovy
+++ b/src/test/gls/innerClass/InnerClassTest.groovy
@@ -2042,6 +2042,23 @@ final class InnerClassTest {
assert err =~ /No such property: missing for class: Outer.Inner/
}
+ @Test // GROOVY-11612
+ 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'
+ '''
+ }
+
@Test // GROOVY-7312
void testInnerClassOfInterfaceIsStatic() {
assertScript '''