Wrap switch rule statements into block fix (IDEA-202664, IDEA-207059)

GitOrigin-RevId: 184ebf34bd15c46f54685cf06521cee1d903b056
This commit is contained in:
Tagir Valeev
2019-06-19 16:37:59 +07:00
committed by intellij-monorepo-bot
parent dc7a6184d7
commit da9c5dd049
15 changed files with 208 additions and 4 deletions

View File

@@ -0,0 +1,9 @@
// "Create block" "true"
class X {
void foo(int i) {
switch(i) {
default -> {
}
}
}
}

View File

@@ -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 ->
}
}
}

View File

@@ -0,0 +1,10 @@
// "Create block" "true"
class X {
void foo(int i) {
switch(i) {
case 1 -> {
}
case 2 ->
}
}
}

View File

@@ -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");
}
}
}
}

View File

@@ -0,0 +1,8 @@
// "Create block" "true"
class X {
void foo(int i) {
switch(i) {
default -><caret>
}
}
}

View File

@@ -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 ->
}
}
}

View File

@@ -0,0 +1,9 @@
// "Create block" "true"
class X {
void foo(int i) {
switch(i) {
case 1 -><caret>
case 2 ->
}
}
}

View File

@@ -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");
}
}
}