mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 00:11:26 +07:00
remove redundant else: check all then clauses (IDEA-58136)
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
// "Remove Redundant 'else'" "true"
|
||||
class a {
|
||||
void foo() {
|
||||
int a = 0;
|
||||
int b = 0;
|
||||
if (a != b) {
|
||||
return;
|
||||
}
|
||||
a = b;
|
||||
a++;
|
||||
}
|
||||
}
|
||||
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// "Remove Redundant 'else'" "true"
|
||||
class a {
|
||||
void foo() {
|
||||
int a = 0;
|
||||
int b = 0;
|
||||
if (a != b) {
|
||||
return;
|
||||
} e<caret>lse {
|
||||
a = b;
|
||||
}
|
||||
a++;
|
||||
}
|
||||
}
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
// "Remove Redundant 'else'" "false"
|
||||
class a {
|
||||
void foo() {
|
||||
int a = 0;
|
||||
int b = 0;
|
||||
if (a != b) {
|
||||
a = 10;
|
||||
} else if (a + 1 == b) {
|
||||
return;
|
||||
}
|
||||
e<caret>lse {
|
||||
a = b;
|
||||
}
|
||||
a++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user