19 lines
356 B
Java
Raw Normal View History

2007-12-01 00:00:00 +00:00
/*
* @test /nodynamiccopyright/
2007-12-01 00:00:00 +00:00
* @bug 4725725
* @summary missing DA error in anonymous ctor
* @author Neal Gafter (gafter)
*
* @compile/fail/ref=T4725725.out -XDrawDiagnostics T4725725.java
2007-12-01 00:00:00 +00:00
*/
class T4725725 {
final int x;
final Object o = new Object() {
int y = x; // error: x not DA
};
{
x = 12;
}
}