author | mcimadamore |
Wed, 26 Oct 2016 15:41:25 +0100 | |
changeset 41856 | 13a056e8f16e |
parent 25308 | 190cac01c316 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
25308
190cac01c316
8044236: create .out files for DefiniteAssignment tests in tools/javac dir
sogoel
parents:
5520
diff
changeset
|
2 |
* @test /nodynamiccopyright/ |
10 | 3 |
* @bug 4725725 |
4 |
* @summary missing DA error in anonymous ctor |
|
5 |
* @author Neal Gafter (gafter) |
|
6 |
* |
|
25308
190cac01c316
8044236: create .out files for DefiniteAssignment tests in tools/javac dir
sogoel
parents:
5520
diff
changeset
|
7 |
* @compile/fail/ref=T4725725.out -XDrawDiagnostics T4725725.java |
10 | 8 |
*/ |
9 |
||
10 |
class T4725725 { |
|
11 |
final int x; |
|
12 |
final Object o = new Object() { |
|
13 |
int y = x; // error: x not DA |
|
14 |
}; |
|
15 |
{ |
|
16 |
x = 12; |
|
17 |
} |
|
18 |
} |