Skip to content

Commit 3e5cdc1

Browse files
Adds another test for inner class accessibility
This tests when the outer most class is the most restrictive for an inner class depth of 3.
1 parent d5f5565 commit 3e5cdc1

15 files changed

+110
-0
lines changed
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

jbmc/unit/java_bytecode/java_bytecode_parser/InnerClasses.java

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,39 @@ private PrivateDoublyNestedInnerClass(int i) {
118118
}
119119
}
120120

121+
class OuterClassMostRestrictiveDeeplyNested {
122+
public class SinglyNestedPublicClass {
123+
int i;
124+
SinglyNestedPublicClass(int i) {
125+
this.i = i;
126+
}
127+
public class PublicDoublyNestedInnerClass {
128+
public int i;
129+
public PublicDoublyNestedInnerClass(int i) {
130+
this.i = i;
131+
}
132+
}
133+
class DefaultDoublyNestedInnerClass {
134+
int i;
135+
DefaultDoublyNestedInnerClass(int i) {
136+
this.i = i;
137+
}
138+
}
139+
protected class ProtectedDoublyNestedInnerClass {
140+
protected int i;
141+
protected ProtectedDoublyNestedInnerClass(int i) {
142+
this.i = i;
143+
}
144+
}
145+
private class PrivateDoublyNestedInnerClass {
146+
private int i;
147+
private PrivateDoublyNestedInnerClass(int i) {
148+
this.i = i;
149+
}
150+
}
151+
}
152+
}
153+
121154
class ContainsAnonymousClass {
122155
interface InnerInterface {
123156
int i = 0;

0 commit comments

Comments
 (0)