blob: c4707e98813056a1ff024bfd99f5855c3dd5f13c [file]
class Test {
void test() {
int i = <error descr="Switch expression does not have any result expressions">switch</error>(0) {
default -> throw new NullPointerException();
};
}
void test2() {
int i = <error descr="Switch expression does not have any result expressions">switch</error>(0) {
case 0 -> {while(true);}
case 1 -> {
throw new RuntimeException();
}
default -> throw new NullPointerException();
};
}
void positive() {
int i = switch(0) {
case 4 -> 2;
default -> throw new NullPointerException();
};
}
}