class Test {
void test() {
int i = switch(0) {
default -> throw new NullPointerException();
};
}
void test2() {
int i = switch(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();
};
}
}