mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-04 20:30:42 +07:00
Adds a quick-fix: "Lift 'throw' out of 'switch' expression" that that is provided for error "'switch' expression does not have any result expressions". Some rare cases are not handled (fix is not provided for mentioned error). For example when switch is used inside: - initialization/condition/update part of for loop - initializer of class field - condition of do-while loop - lock expression in synchronized statement - any part of assert statement - resource initializer of 'try' statement #IDEA-283208 Fixed Merge-request: IJ-MR-172146 Merged-by: Marcin Mikosik <marcin.mikosik@jetbrains.com> GitOrigin-RevId: a2710c49e16b7f495974fb167bcae01b3d850f7b
9 lines
208 B
Java
9 lines
208 B
Java
// "Lift 'throw' out of 'switch' expression" "true-preview"
|
|
|
|
class Foo {
|
|
int bar(Three param) {
|
|
throw <caret>switch (param) {
|
|
default -> throw new RuntimeException("default");
|
|
};
|
|
}
|
|
} |