test/langtools/tools/javac/switchexpr/ExpressionSwitchFlow.java
changeset 55528 bad3754349aa
parent 55306 ea43db53de91
child 58679 9c3209ff7550
child 59021 cfc7bb9a5a92
--- a/test/langtools/tools/javac/switchexpr/ExpressionSwitchFlow.java	Fri Jun 28 05:29:54 2019 +0800
+++ b/test/langtools/tools/javac/switchexpr/ExpressionSwitchFlow.java	Thu Jun 27 10:39:27 2019 +0200
@@ -22,6 +22,7 @@
     private String test3(int i) {
         return switch (i) {
             case 0 -> {}
+            case 1 -> "";
             default -> throw new IllegalStateException();
         };
     }
@@ -40,17 +41,20 @@
     private String test6(int i) {
         return switch (i) {
             case 0 -> throw new IllegalStateException();
+            case 1 -> "";
             default -> {}
         };
     }
     private String test7(int i) {
         return switch (i) {
             case 0: throw new IllegalStateException();
+            case 1: yield "";
             default:
         };
     }
     private String test8(int i) {
         return switch (i) {
+            case 1: yield "";
             case 0: i++;
             default: {
             }
@@ -58,6 +62,7 @@
     }
     private String test9(int i) {
         return switch (i) {
+            case 1: yield "";
             case 0:
             default:
                 System.err.println();