Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/deleteSwitchLabel/beforeDeleteCase2.java
Tagir Valeev 5fc3612fa9 DeleteSwitchLabelFix: delete unreachable switch branch
Fixes IDEA-199692 Quickfix to delete unreachable switch branch reported by "constant conditions & exceptions"
2018-10-01 14:54:36 +07:00

21 lines
514 B
Java

// "Remove switch label '"bar"'" "true"
class Main {
public void test() {
switch ("foo") {
case "baz":
int i = 1;
class Foo {}
System.out.println(i);
break;
case "qux":
case "<caret>bar" // comment
:
i = 2;
System.out.println("hello"+new Foo()+i);
//oops
default:
System.out.println("oops");
}
}
}