mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-21 21:50:54 +07:00
16 lines
330 B
Plaintext
16 lines
330 B
Plaintext
public class IgnoreSomething {
|
|
public sealed interface Foo permits Foo.A, Foo.B {
|
|
record A(int value) implements Foo {}
|
|
record B(int value) implements Foo {}
|
|
}
|
|
|
|
public class Bar {
|
|
public int toCode(Foo foo) {
|
|
return switch (foo) {
|
|
case Foo.A _ -> 0;
|
|
case Foo.B _ -> 1;
|
|
};
|
|
}
|
|
}
|
|
}
|