Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/deleteSwitchLabel19/afterTopLevelVarReassigned1.java
Andrey.Cherkasov 7615667adc [java-intentions] UnwrapSwitchLabelFix: rewrite record pattern support
IJ-CR-27938
IDEA-297387

GitOrigin-RevId: d275fd7a37d6b4e955cdc654bd676cb9048601be
2022-10-17 14:57:44 +00:00

11 lines
269 B
Java

// "Remove unreachable branches" "true"
class Test {
void test(Object obj) {
if (!(obj instanceof R)) return;
R rec = (R) obj;
rec = new R(42, "hello");
System.out.println(rec.s() + rec.i());
}
record R(int i, String s) {}
}