test/langtools/tools/javac/switchexpr/EmptySwitch.java
changeset 59021 cfc7bb9a5a92
parent 55528 bad3754349aa
equal deleted inserted replaced
59020:aebd72de84b0 59021:cfc7bb9a5a92
    23 
    23 
    24 /*
    24 /*
    25  * @test
    25  * @test
    26  * @bug 8206986 8226510
    26  * @bug 8206986 8226510
    27  * @summary Verify than a switch that does not yield a value is rejected.
    27  * @summary Verify than a switch that does not yield a value is rejected.
    28  * @compile/fail/ref=EmptySwitch.out --enable-preview -source ${jdk.version} -XDrawDiagnostics -XDshould-stop.at=FLOW EmptySwitch.java
    28  * @compile/fail/ref=EmptySwitch.out -XDrawDiagnostics -XDshould-stop.at=FLOW EmptySwitch.java
    29  */
    29  */
    30 
    30 
    31 public class EmptySwitch {
    31 public class EmptySwitch {
    32     private void print(EmptySwitchEnum t) {
    32     private void print(EmptySwitchEnum t) {
    33         (switch (t) {
    33         (switch (t) {