aoqi@0: /* aoqi@0: * @test /nodynamiccopyright/ aoqi@0: * @bug 8039026 aoqi@0: * @summary Definitely unassigned field can be accessed aoqi@0: * @compile/fail/ref=T8039026.out -XDrawDiagnostics T8039026.java aoqi@0: */ aoqi@0: aoqi@0: public class T8039026 { aoqi@0: final int x,y,z; aoqi@0: final int a = this.y; // <- error aoqi@0: { aoqi@0: int b = true ? this.x : 0; // <- error aoqi@0: System.out.println(this.x); // <- error aoqi@0: this.y = 1; aoqi@0: } aoqi@0: T8039026() { aoqi@0: this.x = 1; // <- no error! aoqi@0: this.y = 1; // <- error aoqi@0: this.z = this.x; // <- no error aoqi@0: } aoqi@0: }