You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by em...@apache.org on 2021/03/03 17:29:58 UTC

[groovy] 02/02: GROOVY-9951: add test case

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

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

commit c4374346313d83a6388cfee548f71e264c71460f
Author: Eric Milles <er...@thomsonreuters.com>
AuthorDate: Wed Mar 3 11:18:51 2021 -0600

    GROOVY-9951: add test case
---
 src/test/groovy/transform/stc/BugsSTCTest.groovy | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/src/test/groovy/transform/stc/BugsSTCTest.groovy b/src/test/groovy/transform/stc/BugsSTCTest.groovy
index f7bf560..887fc86 100644
--- a/src/test/groovy/transform/stc/BugsSTCTest.groovy
+++ b/src/test/groovy/transform/stc/BugsSTCTest.groovy
@@ -938,4 +938,19 @@ Printer
             }
         '''
     }
+
+    // GROOVY-9951
+    void testInnerImmutable() {
+        assertScript '''
+            class Outer {
+                @groovy.transform.Immutable
+                static class Inner {
+                    String proper
+                }
+            }
+
+            def obj = new Outer.Inner('value')
+            assert obj.proper == 'value'
+        '''
+    }
 }