mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-05 21:00:59 +07:00
ConvertSwitchToIfIntention: fix processing of empty blocks
IDEA-205137 `Replace Switch with If` produce exceptions IDEA-205122 Unwrap switch fails with exception
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
// "Replace 'switch' with 'if'" "true"
|
||||
class Test {
|
||||
void m() {
|
||||
if (0 == 1) {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Replace 'switch' with 'if'" "true"
|
||||
class Test {
|
||||
void m() {
|
||||
switc<caret>h (0) {
|
||||
case 1 -> {
|
||||
}
|
||||
default -> {}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user