IDEA-203984 "Remove unreachable branches" quickfix breaks code on switch expression

This commit is contained in:
Tagir Valeev
2018-12-11 15:48:48 +07:00
parent 9d2e64a6c5
commit 98347e5018
4 changed files with 36 additions and 19 deletions
@@ -13,7 +13,7 @@ class Main {
}
//6
//7
//other
default -> "and more"; //other
});
}
}
@@ -0,0 +1,14 @@
// "Remove unreachable branches" "false"
class X {
int x(E e) {
// We cannot do anything here (yet)
return switch (E.AA) {
case A<caret>A:
System.out.println(9);
default: break 0;
};
}
}
enum E {
AA,BB
}