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:07:23 UTC
[groovy] branch GROOVY_4_0_X updated: add test case
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 d99fe8d5c6 add test case
d99fe8d5c6 is described below
commit d99fe8d5c6c8edb35164373944288fff33cebeb3
Author: Eric Milles <er...@thomsonreuters.com>
AuthorDate: Wed Apr 6 12:07:13 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 '''