testdata for IDEA-59283

(cherry picked from commit 395ade03a5f4eb59ccd55375cdd97f5c5d196c7a)
This commit is contained in:
Anna Kozlova
2014-10-17 21:06:57 +02:00
parent 403abc677a
commit 6ed35f49fd
2 changed files with 25 additions and 0 deletions
@@ -0,0 +1,21 @@
class Test {
public void doesNotCompile() {
Container<String> container = new Container<String>();
assertThat<error descr="'assertThat(Test.Container<java.lang.String>, Test.Matcher<? super Test.Container<java.lang.String>>)' in 'Test' cannot be applied to '(Test.Container<java.lang.String>, Test.Matcher<Test.Container<capture<? super java.lang.String>>>)'">(container, hasSomething(is("foo")))</error>;
}
public static class Container<T> {}
public static <T> Matcher<Container<T>> hasSomething(Matcher<T> matcher) {
return null;
}
public static <T> void assertThat(T actual, Matcher<? super T> matcher) {}
public static <T> Matcher<? super T> is(T value) {
return null;
}
public interface Matcher<T> {}
}