test/langtools/tools/javac/switchexpr/ExpressionSwitchFlow.java
changeset 59021 cfc7bb9a5a92
parent 55528 bad3754349aa
equal deleted inserted replaced
59020:aebd72de84b0 59021:cfc7bb9a5a92
     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) {