mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-05 02:24:00 +07:00
- change control flow for switch GitOrigin-RevId: e291cb9393e764dd38021311c56909ecb88bc4f8
36 lines
913 B
Java
36 lines
913 B
Java
class AAA{
|
|
void testBoolean(boolean a) {
|
|
switch (a) {
|
|
case true:
|
|
throw new IllegalArgumentException();
|
|
case false:
|
|
throw new IllegalArgumentException();
|
|
}
|
|
<error descr="Unreachable statement">System.out.println();</error>
|
|
}
|
|
|
|
void testBoolean2(Boolean a) {
|
|
switch (a) {
|
|
case true:
|
|
throw new IllegalArgumentException();
|
|
case null:
|
|
throw new IllegalArgumentException();
|
|
default:
|
|
throw new IllegalStateException("Unexpected value: " + a);
|
|
}
|
|
<error descr="Unreachable statement">System.out.println();</error>
|
|
}
|
|
|
|
void testFloat(float a) {
|
|
switch (a) {
|
|
case 1f:
|
|
throw new IllegalArgumentException();
|
|
case Number v:
|
|
throw new IllegalStateException("Unexpected value: " + a);
|
|
}
|
|
<error descr="Unreachable statement">System.out.println();</error>
|
|
}
|
|
|
|
static void main() {
|
|
}
|
|
} |