mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
JavaCompletionUtil: do not add an unnecessary cast if hierarchy signature has several levels
Fixes IDEA-185554 Redundant cast on autocompletion
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
class MyTest {
|
||||
interface Container<K, V> {
|
||||
V read(K k);
|
||||
}
|
||||
|
||||
interface Container2<K, V> extends Container<K, V> {
|
||||
V read(K k);
|
||||
}
|
||||
|
||||
interface Container3<K, V> extends Container2<K, V> {
|
||||
V read(K k);
|
||||
}
|
||||
|
||||
void test(Container3<String, String> c3) {
|
||||
Container<String, String> c = c3;
|
||||
c.re<caret>
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
class MyTest {
|
||||
interface Container<K, V> {
|
||||
V read(K k);
|
||||
}
|
||||
|
||||
interface Container2<K, V> extends Container<K, V> {
|
||||
V read(K k);
|
||||
}
|
||||
|
||||
interface Container3<K, V> extends Container2<K, V> {
|
||||
V read(K k);
|
||||
}
|
||||
|
||||
void test(Container3<String, String> c3) {
|
||||
Container<String, String> c = c3;
|
||||
c.read()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user