test/langtools/tools/javac/switchexpr/SwitchExpressionIsNotAConstant.java
changeset 59021 cfc7bb9a5a92
parent 55306 ea43db53de91
equal deleted inserted replaced
59020:aebd72de84b0 59021:cfc7bb9a5a92
    24 /**
    24 /**
    25  * @test
    25  * @test
    26  * @bug 8214113
    26  * @bug 8214113
    27  * @summary Verify the switch expression's type does not have a constant attached,
    27  * @summary Verify the switch expression's type does not have a constant attached,
    28  *          and so the switch expression is not elided.
    28  *          and so the switch expression is not elided.
    29  * @compile --enable-preview --source ${jdk.version} SwitchExpressionIsNotAConstant.java
    29  * @compile SwitchExpressionIsNotAConstant.java
    30  * @run main/othervm --enable-preview SwitchExpressionIsNotAConstant
    30  * @run main SwitchExpressionIsNotAConstant
    31  */
    31  */
    32 public class SwitchExpressionIsNotAConstant {
    32 public class SwitchExpressionIsNotAConstant {
    33 
    33 
    34     public static void main(String[] args) {
    34     public static void main(String[] args) {
    35         int i = 0;
    35         int i = 0;