Kotlin: add test for Java and Kotlin both extending Map.Entry

This commit is contained in:
Chris Smowton
2022-06-02 13:30:39 +01:00
parent efc534abe7
commit ebb52adba6
4 changed files with 12 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
import java.util.Map;
public abstract class C<K, V> implements Map.Entry<K, V> { }

View File

@@ -0,0 +1 @@
public abstract class B<K, V> : Map.Entry<K, V> { }

View File

@@ -0,0 +1,2 @@
| comparingByKey | K | Comparable<? super K> |
| comparingByValue | V | Comparable<? super V> |

View File

@@ -0,0 +1,6 @@
import java
from Method m, TypeVariable param
where m.getDeclaringType().getQualifiedName() = "java.util.Map$Entry"
and param = m.(GenericCallable).getATypeParameter()
select m.toString(), param.toString(), param.getATypeBound().toString()