mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-26 20:50:54 +07:00
22 lines
346 B
Java
22 lines
346 B
Java
interface I {
|
|
String getValue();
|
|
}
|
|
|
|
interface J extends I {
|
|
|
|
}
|
|
|
|
class X implements I {
|
|
public String getValue() {return "X";}
|
|
}
|
|
|
|
class Y implements J {
|
|
public String getValue() {return <flown11>"Y";}
|
|
}
|
|
|
|
class Test {
|
|
void foo(I i) {
|
|
if (!(i instanceof J)) return;
|
|
String <caret>s = <flown1>i.getValue();
|
|
}
|
|
} |