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:02:06 UTC
[groovy] branch GROOVY_3_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_3_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/GROOVY_3_0_X by this push:
new 1392fe5b75 add test case
1392fe5b75 is described below
commit 1392fe5b758b2e5f62856406b361717b7126b899
Author: Eric Milles <er...@thomsonreuters.com>
AuthorDate: Wed Apr 6 12:01:55 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 1515770161..0ad84dde39 100644
--- a/src/test/groovy/transform/stc/GenericsSTCTest.groovy
+++ b/src/test/groovy/transform/stc/GenericsSTCTest.groovy
@@ -4039,6 +4039,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 '''