TypeConstraint#withSupers: fixed SOE on circular hierarchy (IDEA-CR-31134)

This commit is contained in:
Tagir Valeev
2018-04-03 10:02:14 +07:00
parent 0080280e10
commit f566678742
4 changed files with 35 additions and 4 deletions
@@ -0,0 +1,14 @@
class Test {
interface B1 extends B2 {
void baseMethod();
}
interface B2 extends B3 {}
interface B3 extends B1 {}
long test(Object obj) {
if (obj instanceof B1 || obj instanceof B2 || obj instanceof B3) {
obj.baseMe<caret>
}
return -1;
}
}
@@ -0,0 +1,14 @@
class Test {
interface B1 extends B2 {
void baseMethod();
}
interface B2 extends B3 {}
interface B3 extends B1 {}
long test(Object obj) {
if (obj instanceof B1 || obj instanceof B2 || obj instanceof B3) {
((B1) obj).baseMethod();
}
return -1;
}
}