mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-26 03:51:12 +07:00
Add sealed hierarchy completion in switch case labels and exclude "case null" and "case default" from selectors of the primitive types. GitOrigin-RevId: 9108465d0f9f2462fa8b9f355c3366cdd1d2c4ab
18 lines
286 B
Java
18 lines
286 B
Java
|
|
class Main {
|
|
int f(Sealed o) {
|
|
return switch(o) {
|
|
<caret>
|
|
}
|
|
}
|
|
|
|
void f(Sealed o) {
|
|
switch(o) {
|
|
<caret>
|
|
}
|
|
}
|
|
}
|
|
|
|
sealed interface Sealed permits Variant1, Variant2 { }
|
|
final class Variant1 implements Sealed { }
|
|
final class Variant2 implements Sealed { } |