mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-30 01:20:53 +07:00
14 lines
281 B
Java
14 lines
281 B
Java
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;
|
|
}
|
|
} |