Add test verifying no malformed wildcards result from captured type variables with a Collection<? extends ...> type

This commit is contained in:
Chris Smowton
2022-11-04 13:46:01 +00:00
parent d999c1d3dd
commit e877967a62
3 changed files with 18 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
import java.util.Collection;
public class Test {
public Collection<? extends CharSequence> getCollection() {
return null;
}
public void test() {
this.getCollection().isEmpty();
}
}

View File

@@ -0,0 +1,5 @@
import java
from Method m, Type t
where m.getAParamType() = t and t.toString().matches("%? super ? extends%")
select m, t