/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 4147520
* @summary Verify correct implementation of qualified 'this' and 'super'.
*
* @run compile QualifiedThisAndSuper_2.java
* @run main QualifiedThisAndSuper_2
*/
import p1.*;
public class QualifiedThisAndSuper_2 {
}
}
A() { super(); }
String s = "as";
private String t = "at";
protected String u = "au";
String m() { return "am"; }
private String n() { return "an"; }
protected String o() { return "ao"; }
B() { super(); }
String s = "bs";
private String t = "bt";
protected String u = "bu";
String m() { return "bm"; }
private String n() { return "bn"; }
protected String o() { return "bo"; }
C() { super(); }
String s = "cs";
private String t = "ct";
protected String u = "cu";
String m() { return "cm"; }
private String n() { return "cn"; }
protected String o() { return "co"; }
void test() {
//---
//---
// should re-use access methods.
//---
//---
//---
//---
//---
A.this.s = "foo";
B.this.s = "bar";
C.this.s = "baz";
A.this.t = "foo";
B.this.t = "bar";
C.this.t = "baz";
A.this.u = "foo";
B.this.u = "bar";
C.this.u = "baz";
A.super.u = "foo";
B.super.u = "bar";
C.super.u = "baz";
}
}
C c = new C();
c.test();
}
}
B b = new B();
b.test();
}
}
A a = new QualifiedThisAndSuper_2().new A();
a.test();
}
}