mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-24 19:12:18 +07:00
During overload resolution, we temporarily fix parent type and check if the parent method is applicable. In this case, we should still check the assignability between the parent type and the result types. It's implemented similarly in PsiConditionalExpressionImpl.getType GitOrigin-RevId: 08ae1f3f900c1db01d817c9fc52fcfc03aec89f3
26 lines
510 B
Java
26 lines
510 B
Java
class X {
|
|
class A {
|
|
A a;
|
|
}
|
|
|
|
void main() {
|
|
A a = new A();
|
|
a.a = a;
|
|
System.out.println(switch (a) {
|
|
case null -> null;
|
|
case A b -> switch (b.a) {
|
|
case null -> null;
|
|
case A c -> switch (c.a) {
|
|
case null -> null;
|
|
case A d -> switch (d.a) {
|
|
case null -> null;
|
|
case A e -> switch (e.a) {
|
|
case A f -> f.toString();
|
|
case null -> null;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
});
|
|
}
|
|
} |