mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 18:58:31 +07:00
Wrap switch rule statements into block fix (IDEA-202664, IDEA-207059)
GitOrigin-RevId: 184ebf34bd15c46f54685cf06521cee1d903b056
This commit is contained in:
committed by
intellij-monorepo-bot
parent
dc7a6184d7
commit
da9c5dd049
@@ -0,0 +1,9 @@
|
||||
// "Create block" "true"
|
||||
class X {
|
||||
void foo(int i) {
|
||||
switch(i) {
|
||||
default -> {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Wrap with block" "true"
|
||||
class X {
|
||||
void foo(int i) {
|
||||
switch(i) {
|
||||
case 1 -> {
|
||||
for(int i=0; i<10; i++) System.out.println(i);
|
||||
}
|
||||
case 2 ->
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Create block" "true"
|
||||
class X {
|
||||
void foo(int i) {
|
||||
switch(i) {
|
||||
case 1 -> {
|
||||
}
|
||||
case 2 ->
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Wrap with block" "true"
|
||||
class X {
|
||||
void foo(int i) {
|
||||
switch(i) {
|
||||
case 1 -> {
|
||||
System.out.println("foo");
|
||||
System.out.println("bar");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Create block" "true"
|
||||
class X {
|
||||
void foo(int i) {
|
||||
switch(i) {
|
||||
default -><caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Wrap with block" "true"
|
||||
class X {
|
||||
void foo(int i) {
|
||||
switch(i) {
|
||||
case 1 -><caret> for(int i=0; i<10; i++) System.out.println(i);
|
||||
case 2 ->
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Create block" "true"
|
||||
class X {
|
||||
void foo(int i) {
|
||||
switch(i) {
|
||||
case 1 -><caret>
|
||||
case 2 ->
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Wrap with block" "true"
|
||||
class X {
|
||||
void foo(int i) {
|
||||
switch(i) {
|
||||
case 1 ->
|
||||
System.out.println("foo");
|
||||
System<caret>.out.println("bar");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user