author | vromero |
Tue, 06 Sep 2016 17:04:43 -0700 | |
changeset 40835 | 6ab9ed1abc46 |
parent 39812 | 6272642715a1 |
child 41931 | d7c9720c4223 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
2 |
* @test /nodynamiccopyright/ |
|
3 |
* @bug 5003235 |
|
4 |
* @summary Private inner class accessible from subclasses |
|
5 |
* @author Peter von der Ah\u00e9 |
|
40835
6ab9ed1abc46
8162546: change hidden options -Xdebug to --debug, -XshouldStop to --should-stop, and -diags to --diags
vromero
parents:
39812
diff
changeset
|
6 |
* @compile/fail/ref=T5003235a.out --diags:layout=%b:%l:%_%m T5003235a.java |
10 | 7 |
*/ |
8 |
||
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 |
} |
|
18 |
||
19 |
class Sub extends Super { |
|
20 |
void foo() { |
|
21 |
i.defaultM(); |
|
22 |
i.protectedM(); |
|
23 |
i.publicM(); |
|
24 |
i.privateM(); |
|
25 |
} |
|
26 |
} |