2007-12-01 00:00:00 +00:00
|
|
|
/*
|
2014-07-02 19:04:04 +00:00
|
|
|
* @test /nodynamiccopyright/
|
2007-12-01 00:00:00 +00:00
|
|
|
* @bug 4087865 4277291
|
|
|
|
* @summary Verify definite assignment of blank finals after 'this(...)'
|
|
|
|
* @author William Maddox (maddox)
|
|
|
|
*
|
2014-07-02 19:04:04 +00:00
|
|
|
* @compile/fail/ref=DefAssignAfterThis_1.out -XDrawDiagnostics DefAssignAfterThis_1.java
|
2007-12-01 00:00:00 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
public class DefAssignAfterThis_1 {
|
|
|
|
|
|
|
|
final int x;
|
|
|
|
|
|
|
|
DefAssignAfterThis_1() {
|
|
|
|
this(0);
|
|
|
|
x = 1; // ERROR -- duplicate assignment to blank final
|
|
|
|
}
|
|
|
|
|
|
|
|
DefAssignAfterThis_1(int i) {
|
|
|
|
x = 1;
|
|
|
|
}
|
|
|
|
}
|