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 15:18:20 UTC
[groovy] branch master updated: GROOVY-10196: 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 2dcb3d8 GROOVY-10196: add test case
2dcb3d8 is described below
commit 2dcb3d89b0cf1ca00cc54f9ac1a4f194da01288f
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 2f8430d..443d030 100644
--- a/src/test/groovy/transform/stc/GenericsSTCTest.groovy
+++ b/src/test/groovy/transform/stc/GenericsSTCTest.groovy
@@ -2522,6 +2522,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
void testPlusInClosure() {
['def', 'var', 'Object', 'Number', 'Integer', 'Comparable'].each { type ->