summaryrefslogtreecommitdiff
path: root/src/test/java/lionel2/NonPubTest.oj
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/lionel2/NonPubTest.oj')
-rw-r--r--src/test/java/lionel2/NonPubTest.oj36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/test/java/lionel2/NonPubTest.oj b/src/test/java/lionel2/NonPubTest.oj
new file mode 100644
index 0000000..727bd3b
--- /dev/null
+++ b/src/test/java/lionel2/NonPubTest.oj
@@ -0,0 +1,36 @@
+package lionel2;
+
+public class NonPubTest instantiates Printer
+{
+ NonPubTest(String s) {}
+
+ public String toString() {
+ NonPubTest t = new NonPubTest("at NonPubTest");
+ A a = new A("at NonPubTest");
+ B b = new B("at NonPubTest");
+ return super.toString();
+ }
+}
+
+
+class A instantiates Printer
+{
+ A(String s) {}
+
+ public void foo() {
+ NonPubTest t = new NonPubTest("at A");
+ A a = new A("at A");
+ B b = new B("at A");
+ }
+}
+
+class B instantiates Printer
+{
+ B(String s) {}
+
+ public void bar() {
+ NonPubTest t = new NonPubTest("at B");
+ A a = new A("at B");
+ B b = new B("at B");
+ }
+}