mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-13 21:55:01 +07:00
IDEA-204717 Can't convert enhanced 'switch' to 'if' if a branch's body contains an end-of-line comment
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
// "Replace 'switch' with 'if'" "true"
|
||||
class Test {
|
||||
void f(int n, int k) {
|
||||
if (n == 0) {
|
||||
if (k == 0) return; //this comment causes the exception IDEA-204717
|
||||
if (k == 1) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// "Replace 'switch' with 'if'" "true"
|
||||
class Test {
|
||||
void f(int n, int k) {
|
||||
sw<caret>itch (n) {
|
||||
case 0 -> {
|
||||
if (k == 0) return; //this comment causes the exception IDEA-204717
|
||||
if (k == 1) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user