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 2022/04/06 17:12:31 UTC

[groovy] branch master updated: add test case

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 0a9da2a145 add test case
0a9da2a145 is described below

commit 0a9da2a1456d3b3ce735f22963b4c42afba1701a
Author: Eric Milles <er...@thomsonreuters.com>
AuthorDate: Wed Apr 6 12:11:25 2022 -0500

    add test case
---
 src/test/groovy/transform/stc/GenericsSTCTest.groovy | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/src/test/groovy/transform/stc/GenericsSTCTest.groovy b/src/test/groovy/transform/stc/GenericsSTCTest.groovy
index c7bfe1bad0..efa15d8f22 100644
--- a/src/test/groovy/transform/stc/GenericsSTCTest.groovy
+++ b/src/test/groovy/transform/stc/GenericsSTCTest.groovy
@@ -4398,6 +4398,20 @@ class GenericsSTCTest extends StaticTypeCheckingTestCase {
         }
     }
 
+    // GROOVY-9968
+    void testSelfReferentialTypeParameter4() {
+        assertScript '''
+            abstract class A<B extends A<?>> implements Iterable<B> {
+            }
+            void m(A iterable) {
+                iterable?.each {
+                    m(it)
+                }
+            }
+            m(null)
+        '''
+    }
+
     // GROOVY-7804
     void testParameterlessClosureToGenericSAMTypeArgumentCoercion() {
         assertScript '''