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/08/17 16:01:03 UTC
[groovy] 02/02: GROOVY-10196: 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 ab42daf603d2a7f4ca520d66ad1a2ad21d7e6cf1
Author: Eric Milles <er...@thomsonreuters.com>
AuthorDate: Tue Aug 17 10:18:10 2021 -0500
GROOVY-10196: add test case
---
.../groovy/transform/stc/GenericsSTCTest.groovy | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/src/test/groovy/transform/stc/GenericsSTCTest.groovy b/src/test/groovy/transform/stc/GenericsSTCTest.groovy
index bfe7836..3d47868 100644
--- a/src/test/groovy/transform/stc/GenericsSTCTest.groovy
+++ b/src/test/groovy/transform/stc/GenericsSTCTest.groovy
@@ -1566,6 +1566,27 @@ class GenericsSTCTest extends StaticTypeCheckingTestCase {
'''
}
+ // GROOVY-10196
+ void testShouldFindMethodEvenWithRepeatNames() {
+ assertScript '''
+ interface M<K,V> {
+ }
+ interface MM<K,V> extends M<K,List<V>> {
+ void add(K key, V val)
+ }
+ class MMA<K,V> implements MM<K,V> {
+ @Override
+ void add(K key, V val) {
+ }
+ }
+ class LMM<K,V> extends MMA<K,V> {
+ }
+
+ MM<String,String> map = new LMM<>()
+ map.add('foo','bar')
+ '''
+ }
+
// GROOVY-5893
@NotYetImplemented
void testPlusInClosure() {