equal
deleted
inserted
replaced
20 }; |
20 }; |
21 } |
21 } |
22 private String test3(int i) { |
22 private String test3(int i) { |
23 return switch (i) { |
23 return switch (i) { |
24 case 0 -> {} |
24 case 0 -> {} |
|
25 case 1 -> ""; |
25 default -> throw new IllegalStateException(); |
26 default -> throw new IllegalStateException(); |
26 }; |
27 }; |
27 } |
28 } |
28 private String test4(int i) { |
29 private String test4(int i) { |
29 return switch (i) { |
30 return switch (i) { |
38 }; |
39 }; |
39 } |
40 } |
40 private String test6(int i) { |
41 private String test6(int i) { |
41 return switch (i) { |
42 return switch (i) { |
42 case 0 -> throw new IllegalStateException(); |
43 case 0 -> throw new IllegalStateException(); |
|
44 case 1 -> ""; |
43 default -> {} |
45 default -> {} |
44 }; |
46 }; |
45 } |
47 } |
46 private String test7(int i) { |
48 private String test7(int i) { |
47 return switch (i) { |
49 return switch (i) { |
48 case 0: throw new IllegalStateException(); |
50 case 0: throw new IllegalStateException(); |
|
51 case 1: yield ""; |
49 default: |
52 default: |
50 }; |
53 }; |
51 } |
54 } |
52 private String test8(int i) { |
55 private String test8(int i) { |
53 return switch (i) { |
56 return switch (i) { |
|
57 case 1: yield ""; |
54 case 0: i++; |
58 case 0: i++; |
55 default: { |
59 default: { |
56 } |
60 } |
57 }; |
61 }; |
58 } |
62 } |
59 private String test9(int i) { |
63 private String test9(int i) { |
60 return switch (i) { |
64 return switch (i) { |
|
65 case 1: yield ""; |
61 case 0: |
66 case 0: |
62 default: |
67 default: |
63 System.err.println(); |
68 System.err.println(); |
64 }; |
69 }; |
65 } |
70 } |