< prev index next >

test/langtools/tools/javac/switchexpr/SwitchExpressionIsNotAConstant.java

Print this page
rev 56510 : 8232684: Make switch expressions final
Reviewed-by: TBD

*** 24,35 **** /** * @test * @bug 8214113 * @summary Verify the switch expression's type does not have a constant attached, * and so the switch expression is not elided. ! * @compile --enable-preview --source ${jdk.version} SwitchExpressionIsNotAConstant.java ! * @run main/othervm --enable-preview SwitchExpressionIsNotAConstant */ public class SwitchExpressionIsNotAConstant { public static void main(String[] args) { int i = 0; --- 24,35 ---- /** * @test * @bug 8214113 * @summary Verify the switch expression's type does not have a constant attached, * and so the switch expression is not elided. ! * @compile SwitchExpressionIsNotAConstant.java ! * @run main SwitchExpressionIsNotAConstant */ public class SwitchExpressionIsNotAConstant { public static void main(String[] args) { int i = 0;
< prev index next >