mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-08 18:13:59 +07:00
- use dfa GitOrigin-RevId: 19cdc3be30263c4b3dbbfff173c557c62c376d67
19 lines
402 B
Java
19 lines
402 B
Java
import org.jetbrains.annotations.Nullable;
|
|
|
|
class TestExample {
|
|
sealed interface II {
|
|
record AI() implements II {}
|
|
|
|
record BI() implements II {}
|
|
}
|
|
|
|
record RI(@Nullable II value) {}
|
|
|
|
private static II getII(RI ri) {
|
|
return switch (ri) {
|
|
case RI(<warning descr="Pattern matching may throw 'MatchException'">II.BI bi</warning>) -> bi;
|
|
case RI(II.AI ai) -> ai;
|
|
};
|
|
}
|
|
}
|