Jonathan Gibbons ccd014ed3f 6971882: Remove -XDstdout from javac test
Reviewed-by: darcy
2010-07-26 14:18:45 -07:00

27 lines
559 B
Java

/*
* @test /nodynamiccopyright/
* @bug 5003235
* @summary Private inner class accessible from subclasses
* @author Peter von der Ah\u00e9
* @compile/fail/ref=T5003235a.out -XDdiags=%b:%l:%_%m T5003235a.java
*/
class Super {
Inner i;
private class Inner {
void defaultM() {}
protected void protectedM() {}
public void publicM() {}
private void privateM() {}
}
}
class Sub extends Super {
void foo() {
i.defaultM();
i.protectedM();
i.publicM();
i.privateM();
}
}