jdk-24/test/langtools/tools/javac/enum/EnumSwitch2.java
Jan Lahoda eaa80ad08c 8300543: Compiler Implementation for Pattern Matching for switch
8300545: Compiler Implementation for Record Patterns

Co-authored-by: Aggelos Biboudis <abimpoudis@openjdk.org>
Reviewed-by: vromero, mcimadamore
2023-05-22 04:24:06 +00:00

21 lines
410 B
Java

/*
* @test /nodynamiccopyright/
* @bug 4936393 8050021
* @summary enum switch case labels required to be unqualified.
* @author gafter
* @compile/fail/ref=EnumSwitch2.out -XDrawDiagnostics --release 20 EnumSwitch2.java
*/
enum E1 { a, b, c, d, e }
class EnumSwitch2 {
void f(E1 e1) {
switch (e1) {
case E1.a:
case E1.d:
default:
break;
}
}
}