test/tools/javac/T5003235/T5003235a.java

Fri, 17 Feb 2012 15:24:40 -0800

author
darcy
date
Fri, 17 Feb 2012 15:24:40 -0800
changeset 1199
e127334a64fe
parent 611
4172cfff05f0
child 2525
2eb010b6cb22
permissions
-rw-r--r--

7143910: test/tools/apt/Basics/apt.sh fails with 'real' sh
Reviewed-by: darcy
Contributed-by: sonali.goel@oracle.com

     1 /*
     2  * @test  /nodynamiccopyright/
     3  * @bug     5003235
     4  * @summary Private inner class accessible from subclasses
     5  * @author  Peter von der Ah\u00e9
     6  * @compile/fail/ref=T5003235a.out -XDdiags=%b:%l:%_%m T5003235a.java
     7  */
     9 class Super {
    10     Inner i;
    11     private class Inner {
    12         void defaultM() {}
    13         protected void protectedM() {}
    14         public void publicM() {}
    15         private void privateM() {}
    16     }
    17 }
    19 class Sub extends Super {
    20     void foo() {
    21         i.defaultM();
    22         i.protectedM();
    23         i.publicM();
    24         i.privateM();
    25     }
    26 }

mercurial