sealed interface Type {
final class A implements Type {}
final class B implements Type {}
default void a() {
Type t;
switch (t) {
}
}
}
A quickfix option for the empty switch proposes to add a default branch. That default branch is added as a switch statement (with default: break) rather than an expression (default -> {}), which users might not want as the default completion. Probably the solution is to add an option to add it as an expression.
From https://github.com/eclipse-jdt/eclipse.jdt.core/issues/2565.
A quickfix option for the empty switch proposes to add a default branch. That default branch is added as a switch statement (with
default: break
) rather than an expression (default -> {}
), which users might not want as the default completion. Probably the solution is to add an option to add it as an expression.