< prev index next >

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

Print this page

        

*** 1,10 **** /* * @test /nodynamiccopyright/ * @bug 8212982 * @summary Verify a compile-time error is produced if switch expression does not provide a value ! * @compile/fail/ref=ExpressionSwitchFlow.out --enable-preview -source 12 -XDrawDiagnostics ExpressionSwitchFlow.java */ public class ExpressionSwitchFlow { private String test1(int i) { return switch (i) { --- 1,10 ---- /* * @test /nodynamiccopyright/ * @bug 8212982 * @summary Verify a compile-time error is produced if switch expression does not provide a value ! * @compile/fail/ref=ExpressionSwitchFlow.out --enable-preview -source 13 -XDrawDiagnostics ExpressionSwitchFlow.java */ public class ExpressionSwitchFlow { private String test1(int i) { return switch (i) {
< prev index next >