diff --git a/java/ql/test/library-tests/wildcards-and-captured-types/Test.java b/java/ql/test/library-tests/wildcards-and-captured-types/Test.java new file mode 100644 index 00000000000..1696a035fd6 --- /dev/null +++ b/java/ql/test/library-tests/wildcards-and-captured-types/Test.java @@ -0,0 +1,13 @@ +import java.util.Collection; + +public class Test { + + public Collection getCollection() { + return null; + } + + public void test() { + this.getCollection().isEmpty(); + } + +} diff --git a/java/ql/test/library-tests/wildcards-and-captured-types/test.expected b/java/ql/test/library-tests/wildcards-and-captured-types/test.expected new file mode 100644 index 00000000000..e69de29bb2d diff --git a/java/ql/test/library-tests/wildcards-and-captured-types/test.ql b/java/ql/test/library-tests/wildcards-and-captured-types/test.ql new file mode 100644 index 00000000000..3e28a2c1d67 --- /dev/null +++ b/java/ql/test/library-tests/wildcards-and-captured-types/test.ql @@ -0,0 +1,5 @@ +import java + +from Method m, Type t +where m.getAParamType() = t and t.toString().matches("%? super ? extends%") +select m, t