Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createMissingSealedClassSwitchBranches/beforeNonSealedPermitted.java
Mikhail Pyltsin ed67eee493 [java-inspection] IDEA-340576 Uncompilable code generated for switch pattern matching
- class, which has permitted list, doesn't have `sealed` modifier, process this class as sealed

GitOrigin-RevId: afaccb6f6479c90ad431b9300a586854e89ea204
2023-12-14 19:49:13 +00:00

14 lines
276 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 (it<caret>em) {
};
}
}