Files
openide/java/java-tests/testData/codeInsight/completion/normal/variants/CompletionSealedHierarchyStmt.java
Nikita Eshkeev 5ecc0aec9c [java][switch completion] IDEA-270439 Code completion for pattern matching in switch
Reuse the SealedUtils#findSameFileInheritorsClasses method in order to eliminate the duplicating code and reduce the searching scope. Enable "return" when there is a lambda in a switch label

GitOrigin-RevId: 6e6dbcb8d9b1b16828fcdd29c1e59b2f47a71bb5
2021-08-08 20:45:50 +00:00

13 lines
270 B
Java

class Main {
void f(Sealed o) {
switch(o) {
<caret>
}
}
private static sealed interface Sealed permits Variant1, Variant2 { }
private static final class Variant1 implements Sealed { }
private static final class Variant2 implements Sealed { }
}