mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-26 19:06:24 +07:00
Java: Fixed "Unwrap else branch" - create consistent PSI (IDEA-192543)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
// "Unwrap 'else' branch" "true"
|
||||
|
||||
class T {
|
||||
String f(boolean a, boolean b) {
|
||||
if (b) {
|
||||
return "When true";
|
||||
} else {
|
||||
if (a) {
|
||||
return "a";
|
||||
}
|
||||
return "Otherwise";
|
||||
}
|
||||
return "Default";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// "Unwrap 'else' branch" "true"
|
||||
|
||||
class T {
|
||||
String f(boolean a, boolean b) {
|
||||
if (b) {
|
||||
return "When true";
|
||||
} else if (a) {
|
||||
return "a";
|
||||
} <caret>else {
|
||||
return "Otherwise";
|
||||
}
|
||||
return "Default";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user