2007-12-01 00:00:00 +00:00
|
|
|
/*
|
2014-07-02 20:29:58 +00:00
|
|
|
* @test /nodynamiccopyright/
|
2015-03-12 04:54:07 +00:00
|
|
|
* @bug 4936393 8050021
|
2007-12-01 00:00:00 +00:00
|
|
|
* @summary enum switch case labels required to be unqualified.
|
|
|
|
* @author gafter
|
2023-05-22 04:24:06 +00:00
|
|
|
* @compile/fail/ref=EnumSwitch2.out -XDrawDiagnostics --release 20 EnumSwitch2.java
|
2007-12-01 00:00:00 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
enum E1 { a, b, c, d, e }
|
|
|
|
|
|
|
|
class EnumSwitch2 {
|
|
|
|
void f(E1 e1) {
|
|
|
|
switch (e1) {
|
|
|
|
case E1.a:
|
|
|
|
case E1.d:
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|