jdk
1/*
2* @test /nodynamiccopyright/
3* @bug 4689058
4* @summary unverifiable code for implicit outer in super constructor call
5*
6* @compile/fail/ref=NewBeforeOuterConstructed2.out -XDrawDiagnostics NewBeforeOuterConstructed2.java
7*/
8
9public class NewBeforeOuterConstructed2 {
10NewBeforeOuterConstructed2(Object o) {}
11class Middle extends NewBeforeOuterConstructed2 {
12Middle(int i) {
13super(null);
14}
15Middle() {
16// The 'new' below is illegal, as the outer
17// constructor has not been called when the
18// implicit reference to 'this' is evaluated
19// during the new instance expression.
20super(/*Middle.this.*/new Middle(1));
21}
22class Inner {}
23void f() {
24System.out.println("ok");
25}
26}
27}
28