test/langtools/tools/javac/switchexpr/ExpressionSwitchFlow.java
changeset 53023 6879069d9d94
parent 52635 6938c8ef179a
child 53878 4584d0331318
equal deleted inserted replaced
53022:ece620f32d2d 53023:6879069d9d94
     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 12 -XDrawDiagnostics ExpressionSwitchFlow.java
     5  * @compile/fail/ref=ExpressionSwitchFlow.out --enable-preview -source 13 -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) {