Fix unwrap 'if' when it's immediately followed by label

GitOrigin-RevId: 8dd9e0c5ba33fb2452e66126e51845ee1999af36
This commit is contained in:
Tagir Valeev
2020-07-07 08:18:42 +00:00
committed by intellij-monorepo-bot
parent 73fd8a4d33
commit 142b1e7fd9
3 changed files with 37 additions and 1 deletions
@@ -0,0 +1,15 @@
// "Unwrap 'if' statement" "true"
class X {
public String testUnwrap(String f) {
switch (f) {
case "A":
return "A";
case "B":
return "b";
case "D":
return "D";
default:
return null;
}
}
}
@@ -0,0 +1,17 @@
// "Unwrap 'if' statement" "true"
class X {
public String testUnwrap(String f) {
switch (f) {
case "A":
return "A";
case "B":
if (t<caret>rue) {
return "b";
}
case "D":
return "D";
default:
return null;
}
}
}