author | sadayapalam |
Thu, 12 Mar 2015 10:24:07 +0530 | |
changeset 29430 | 0fc887a8c519 |
parent 25309 | dcd9a7e19669 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
25309
dcd9a7e19669
8044864: .out files for enum tests in tools/javac dir - part 1
sogoel
parents:
5520
diff
changeset
|
2 |
* @test /nodynamiccopyright/ |
29430
0fc887a8c519
8050021: Improper "duplicate case label" error
sadayapalam
parents:
25309
diff
changeset
|
3 |
* @bug 4936393 8050021 |
10 | 4 |
* @summary enum switch case labels required to be unqualified. |
5 |
* @author gafter |
|
25309
dcd9a7e19669
8044864: .out files for enum tests in tools/javac dir - part 1
sogoel
parents:
5520
diff
changeset
|
6 |
* @compile/fail/ref=EnumSwitch2.out -XDrawDiagnostics EnumSwitch2.java |
10 | 7 |
*/ |
8 |
||
9 |
enum E1 { a, b, c, d, e } |
|
10 |
||
11 |
class EnumSwitch2 { |
|
12 |
void f(E1 e1) { |
|
13 |
switch (e1) { |
|
14 |
case E1.a: |
|
15 |
case E1.d: |
|
16 |
default: |
|
17 |
break; |
|
18 |
} |
|
19 |
} |
|
20 |
} |