mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-02 11:18:16 +07:00
- class, which has permitted list, doesn't have `sealed` modifier, process this class as sealed GitOrigin-RevId: afaccb6f6479c90ad431b9300a586854e89ea204
15 lines
298 B
Java
15 lines
298 B
Java
// "Create missing switch branch 'Outer.Book'" "true-preview"
|
|
class Outer {
|
|
interface SaleItem permits Book {
|
|
}
|
|
|
|
record Book(String title, String author, double price) implements SaleItem {
|
|
}
|
|
|
|
|
|
int calc(SaleItem item) {
|
|
return switch (item) {
|
|
case Book book -> 0;
|
|
};
|
|
}
|
|
} |