author | sogoel |
Wed, 02 Jul 2014 13:29:58 -0700 | |
changeset 25309 | dcd9a7e19669 |
parent 5520 | 86e4b9a9da40 |
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/ |
10 | 3 |
* @bug 5009601 |
4 |
* @summary enum constructors cannot be declared public or protected |
|
5 |
* @author Joseph D. Darcy |
|
6 |
* |
|
25309
dcd9a7e19669
8044864: .out files for enum tests in tools/javac dir - part 1
sogoel
parents:
5520
diff
changeset
|
7 |
* @compile/fail/ref=EnumPublicConstructor.out -XDrawDiagnostics EnumPublicConstructor.java |
10 | 8 |
*/ |
9 |
||
10 |
enum EnumPublicConstructor { |
|
11 |
RED(255, 0, 0), |
|
12 |
GREEN(0, 255, 0), |
|
13 |
BLUE(0, 0, 255); |
|
14 |
||
15 |
private int r, g, b; |
|
16 |
public EnumPublicConstructor(int r, int g, int b) { |
|
17 |
this.r = r; |
|
18 |
this.g = g; |
|
19 |
this.b = b; |
|
20 |
} |
|
21 |
} |