mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-10 01:09:46 +07:00
31 lines
773 B
Java
31 lines
773 B
Java
class Test {
|
|
void test(Object o, Integer integer) {
|
|
switch (o) {
|
|
case String s && <error descr="Incompatible types. Found: 'java.lang.Integer', required: 'boolean'">integer</error> -> System.out.println();
|
|
default -> {}
|
|
}
|
|
|
|
switch (o) {
|
|
case String s && isBool() -> System.out.println();
|
|
default -> {}
|
|
}
|
|
|
|
switch (o) {
|
|
case Integer i && <error descr="Incompatible types. Found: 'int', required: 'boolean'">isInt()</error>:
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
|
|
switch (o) {
|
|
case Integer i && <error descr="Incompatible types. Found: 'null', required: 'boolean'">null</error>:
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
|
|
private native boolean isBool();
|
|
|
|
private native int isInt();
|
|
} |