author | jlahoda |
Thu, 09 Oct 2014 10:08:52 +0200 | |
changeset 26993 | 513b2cae81c3 |
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 4087865 4277291 |
4 |
* @summary Verify definite assignment of blank finals after 'this(...)' |
|
5 |
* @author William Maddox (maddox) |
|
6 |
* |
|
25308
190cac01c316
8044236: create .out files for DefiniteAssignment tests in tools/javac dir
sogoel
parents:
5520
diff
changeset
|
7 |
* @compile/fail/ref=DefAssignAfterThis_1.out -XDrawDiagnostics DefAssignAfterThis_1.java |
10 | 8 |
*/ |
9 |
||
10 |
public class DefAssignAfterThis_1 { |
|
11 |
||
12 |
final int x; |
|
13 |
||
14 |
DefAssignAfterThis_1() { |
|
15 |
this(0); |
|
16 |
x = 1; // ERROR -- duplicate assignment to blank final |
|
17 |
} |
|
18 |
||
19 |
DefAssignAfterThis_1(int i) { |
|
20 |
x = 1; |
|
21 |
} |
|
22 |
} |