check type argument is in type parameter's bounds: ensure that resulted intersection type is valid

This commit is contained in:
Anna Kozlova
2014-08-27 20:59:31 +04:00
parent 366ce9a8c6
commit 66b21d3562
3 changed files with 15 additions and 1 deletions
@@ -0,0 +1,5 @@
class Test<T > {
public static interface EventListener<V extends String> {}
public void addListener (EventListener<<error descr="Type parameter '? extends T' is not within its bound; should extend 'java.lang.String'">? extends T</error>> listener) {}
public void addListener1(EventListener<? super T> listener) {}
}