< prev index next >

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

Print this page

        

*** 1,10 **** /* * @test /nodynamiccopyright/ * @bug 8206986 * @summary Verify behavior of not exhaustive switch expressions. ! * @compile/fail/ref=ExpressionSwitchNotExhaustive.out -XDrawDiagnostics --enable-preview -source 12 ExpressionSwitchNotExhaustive.java */ public class ExpressionSwitchNotExhaustive { private String print(int i) { return switch (i) { --- 1,10 ---- /* * @test /nodynamiccopyright/ * @bug 8206986 * @summary Verify behavior of not exhaustive switch expressions. ! * @compile/fail/ref=ExpressionSwitchNotExhaustive.out -XDrawDiagnostics --enable-preview -source 13 ExpressionSwitchNotExhaustive.java */ public class ExpressionSwitchNotExhaustive { private String print(int i) { return switch (i) {
< prev index next >