equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * @test /nodynamiccopyright/ |
2 * @test /nodynamiccopyright/ |
3 * @bug 8212982 |
3 * @bug 8212982 |
4 * @summary Verify a compile-time error is produced if switch expression does not provide a value |
4 * @summary Verify a compile-time error is produced if switch expression does not provide a value |
5 * @compile/fail/ref=ExpressionSwitchFlow.out --enable-preview -source ${jdk.version} -XDrawDiagnostics ExpressionSwitchFlow.java |
5 * @compile/fail/ref=ExpressionSwitchFlow.out -XDrawDiagnostics ExpressionSwitchFlow.java |
6 */ |
6 */ |
7 |
7 |
8 public class ExpressionSwitchFlow { |
8 public class ExpressionSwitchFlow { |
9 private String test1(int i) { |
9 private String test1(int i) { |
10 return switch (i) { |
10 return switch (i) { |