switch expression: support old syntax without braces

IDEA-CR-40239
This commit is contained in:
Anna.Kozlova
2018-11-30 16:28:02 +01:00
parent 6d3386a117
commit 9080b35751
2 changed files with 19 additions and 0 deletions
@@ -79,5 +79,21 @@ no instance(s) of type variable(s) exist so that Integer conforms to String">()
};
}
};
String s3 = switch (0) {
default: {
break switch (1) {
case 2: {
System.out.println();
int inside_switch = switch (8) {
default:
break 1;
};
}
default:
break <error descr="Bad type in switch expression: int cannot be converted to java.lang.String">1</error>;
};
}
};
}
}