assignment fix for super wildcards (IDEA-125031)

This commit is contained in:
Anna Kozlova
2014-05-13 18:04:55 +04:00
parent 6e2f355a81
commit b32b3332c4
3 changed files with 17 additions and 1 deletions
@@ -0,0 +1,15 @@
import java.util.Set;
class Test {
public static void test(Set foo, Matcher<Iterable<String>> matcher) {
assertThat<error descr="'assertThat(Test.Matcher<? super java.util.Set>, java.util.Set)' in 'Test' cannot be applied to '(Test.Matcher<java.lang.Iterable<java.lang.String>>, java.util.Set)'">(matcher, foo)</error>;
Matcher<Iterable<String>> b = null;
<error descr="Incompatible types. Found: 'Test.Matcher<java.lang.Iterable<java.lang.String>>', required: 'Test.Matcher<? super java.util.Set>'">Matcher<? super Set> a = b;</error>
}
public static <T> void assertThat(Matcher<? super T> matcher, T actual) {}
static class Matcher<K> {}
}