test/langtools/tools/javac/switchexpr/ExpressionSwitchNotExhaustive.java
changeset 59021 cfc7bb9a5a92
parent 55306 ea43db53de91
equal deleted inserted replaced
59020:aebd72de84b0 59021:cfc7bb9a5a92
     1 /*
     1 /*
     2  * @test /nodynamiccopyright/
     2  * @test /nodynamiccopyright/
     3  * @bug 8206986
     3  * @bug 8206986
     4  * @summary Verify behavior of not exhaustive switch expressions.
     4  * @summary Verify behavior of not exhaustive switch expressions.
     5  * @compile/fail/ref=ExpressionSwitchNotExhaustive.out -XDrawDiagnostics --enable-preview -source ${jdk.version} ExpressionSwitchNotExhaustive.java
     5  * @compile/fail/ref=ExpressionSwitchNotExhaustive.out -XDrawDiagnostics ExpressionSwitchNotExhaustive.java
     6  */
     6  */
     7 
     7 
     8 public class ExpressionSwitchNotExhaustive {
     8 public class ExpressionSwitchNotExhaustive {
     9     private String print(int i) {
     9     private String print(int i) {
    10         return switch (i) {
    10         return switch (i) {