2007-12-01 00:00:00 +00:00
|
|
|
/*
|
2014-07-02 12:04:04 -07:00
|
|
|
* @test /nodynamiccopyright/
|
2007-12-01 00:00:00 +00:00
|
|
|
* @bug 4725725
|
|
|
|
* @summary missing DA error in anonymous ctor
|
|
|
|
* @author Neal Gafter (gafter)
|
|
|
|
*
|
2014-07-02 12:04:04 -07:00
|
|
|
* @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;
|
|
|
|
}
|
|
|
|
}
|