mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
IDEA-130024 (False warning 'if statement with identical branches')
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user