Java: Don't cast the argument to generic type because we already know that the actual type is assignable to it (IDEA-171284)

This commit is contained in:
Pavel Dolgov
2018-06-29 13:27:21 +03:00
parent 8afdaeaca3
commit 9dce85a4fe
7 changed files with 82 additions and 15 deletions
@@ -0,0 +1,13 @@
class C {
<K> void method() {
class Local {
void foo(K k) {
<selection>System.out.println(k);</selection>
}
void bar() {
Object o = new Object();
System.out.println(o);
}
}
}
}