mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-06 09:36:56 +07:00
17 lines
642 B
Java
17 lines
642 B
Java
public class ConstantAssignment {
|
|
void dd(Double i) {
|
|
switch (i) {
|
|
case <error descr="Unexpected type. Found: 'double', required: 'char, byte, short, int, Character, Byte, Short, Integer, String'">1.0</error> -> System.out.println(1);
|
|
default -> throw new IllegalStateException("Unexpected value: " + i);
|
|
}
|
|
}
|
|
|
|
void dd2(Long i) {
|
|
switch (i) {
|
|
case <error descr="Unexpected type. Found: 'long', required: 'char, byte, short, int, Character, Byte, Short, Integer, String'">1L</error>:
|
|
System.out.println(1);
|
|
default:
|
|
throw new IllegalStateException("Unexpected value: " + i);
|
|
}
|
|
}
|
|
} |