< prev index next >
test/langtools/tools/javac/switchexpr/ExpressionSwitchNotExhaustive.java
Print this page
rev 56806 : 8232684: Make switch expressions final
Reviewed-by: TBD
*** 1,10 ****
/*
* @test /nodynamiccopyright/
* @bug 8206986
* @summary Verify behavior of not exhaustive switch expressions.
! * @compile/fail/ref=ExpressionSwitchNotExhaustive.out -XDrawDiagnostics --enable-preview -source ${jdk.version} 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 ExpressionSwitchNotExhaustive.java
*/
public class ExpressionSwitchNotExhaustive {
private String print(int i) {
return switch (i) {
< prev index next >