ensure fresh variables for the same context don't conflict by names (IDEA-196642)

This commit is contained in:
Anna.Kozlova
2018-08-06 19:32:06 +02:00
parent 83ed9bf603
commit 779291d906
3 changed files with 18 additions and 3 deletions

View File

@@ -0,0 +1,14 @@
class MyTest {
static class Foo<A> {}
static <B> void bar(Foo<? super B> f1, Foo<? super B> f2) { }
{
bar<error descr="'bar(MyTest.Foo<? super B>, MyTest.Foo<? super B>)' in 'MyTest' cannot be applied to '(MyTest.Foo<T>, MyTest.Foo<T>)'">(m(), m())</error>;
}
static <T extends Comparable<T>> Foo<T> m() {
return null;
}
}