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/09/08 18:46:12 UTC

[groovy] 01/02: GROOVY-10049, GROOVY-10166: 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

commit e23480c2927083c042abe75921316a6203b6fe0c
Author: Eric Milles <er...@thomsonreuters.com>
AuthorDate: Wed Sep 8 13:45:53 2021 -0500

    GROOVY-10049, GROOVY-10166: add test case
---
 .../groovy/transform/stc/GenericsSTCTest.groovy    | 23 +++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/src/test/groovy/transform/stc/GenericsSTCTest.groovy b/src/test/groovy/transform/stc/GenericsSTCTest.groovy
index 8b77ec2..f274efd 100644
--- a/src/test/groovy/transform/stc/GenericsSTCTest.groovy
+++ b/src/test/groovy/transform/stc/GenericsSTCTest.groovy
@@ -2542,9 +2542,30 @@ class GenericsSTCTest extends StaticTypeCheckingTestCase {
         '''
     }
 
-    // GROOVY-10196
+    // GROOVY-10049, GROOVY-10166
     void testShouldFindMethodEvenWithRepeatNames2() {
         assertScript '''
+            abstract class A<T extends C> {
+                T getC() {
+                }
+            }
+
+            class C<T extends A> {
+                T get() {
+                    A a = null
+                    a.c.get(1)
+                }
+                T get(int i) {
+                }
+            }
+
+            new C()
+        '''
+    }
+
+    // GROOVY-10196
+    void testShouldFindMethodEvenWithRepeatNames3() {
+        assertScript '''
             interface M<K,V> {
             }
             interface MM<K,V> extends M<K,List<V>> {