Authors: russell@unturf.com · brackishbert@gmail.com · foxhop.net · TimeHexOn.com Patches, unit tests, benchmarks, whitepaper, and outreach briefs. Public domain — no copyright claimed. Use freely.
15 lines
332 B
Java
15 lines
332 B
Java
/*
|
|
* @test /nodynamiccopyright/
|
|
* @bug 6209839
|
|
* @summary Illegal forward reference to enum constants allowed by javac
|
|
* @author Peter von der Ahé
|
|
* @compile/fail/ref=TestEnum4.out -XDrawDiagnostics TestEnum4.java
|
|
*/
|
|
|
|
enum TestEnum {
|
|
BAR,
|
|
QUX,
|
|
BAZ;
|
|
static String X = "X";
|
|
private String y = X;
|
|
}
|