mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-18 00:20:54 +07:00
19 lines
292 B
Java
19 lines
292 B
Java
class C {
|
|
Object foo(boolean b) {
|
|
if (b) {
|
|
<selection>return A.getInstance();</selection>
|
|
} else {
|
|
return B.getInstance();
|
|
}
|
|
}
|
|
}
|
|
class A {
|
|
static A getInstance() {
|
|
return new A();
|
|
}
|
|
}
|
|
class B extends A {
|
|
static B getInstance() {
|
|
return new B();
|
|
}
|
|
} |