mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-18 12:31:26 +07:00
java overload resolution: don't cache anonymous class hierarchies (IDEA-261747)
during overload resolution it may lead to caching of a wrong hierarchy, because type of anonymous class with diamonds depends on the surrounding method call possible optimization: reject caching only for classes with diamonds or only during overload resolution GitOrigin-RevId: ebdb068fb9052741b8bba2b50e5faefcc541438c
This commit is contained in:
committed by
intellij-monorepo-bot
parent
da1828b44b
commit
f355f4d8cd
@@ -0,0 +1,18 @@
|
||||
|
||||
interface P1<T1> { boolean test(T1 t);}
|
||||
interface P2<T2> { boolean test(T2 t);}
|
||||
|
||||
class C {
|
||||
public C(P1<String> c) { }
|
||||
public C(P2<String> p) { }
|
||||
}
|
||||
|
||||
class C1 extends C {
|
||||
public C1() {
|
||||
super(new P2<>() {
|
||||
public boolean test(String s) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user