mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-26 19:06:24 +07:00
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:
+18
@@ -0,0 +1,18 @@
|
||||
class C {
|
||||
<K> void method() {
|
||||
class Local {
|
||||
void foo(K k) {
|
||||
newMethod(k);
|
||||
}
|
||||
|
||||
private void newMethod(K k) {
|
||||
System.out.println(k);
|
||||
}
|
||||
|
||||
void bar() {
|
||||
Object o = new Object();
|
||||
newMethod(o);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user