summaryrefslogtreecommitdiff
path: root/output
diff options
context:
space:
mode:
Diffstat (limited to 'output')
-rw-r--r--output/ex20.java22
-rw-r--r--output/ex21.java24
-rw-r--r--output/negative/ExtendMissing.java12
3 files changed, 58 insertions, 0 deletions
diff --git a/output/ex20.java b/output/ex20.java
new file mode 100644
index 0000000..87dca29
--- /dev/null
+++ b/output/ex20.java
@@ -0,0 +1,22 @@
+class ex20 {
+ public static void main(String[] a){
+ System.out.println(new A().start());
+ }
+}
+
+class C extends B{
+}
+
+class B extends A{
+}
+
+class A{
+
+ A a;
+ C c;
+
+ public int start(){
+ a = c;
+ return 0;
+ }
+}
diff --git a/output/ex21.java b/output/ex21.java
new file mode 100644
index 0000000..2bb11a3
--- /dev/null
+++ b/output/ex21.java
@@ -0,0 +1,24 @@
+class test66{
+ public static void main(String[] a){
+ System.out.println(new Test().start());
+ }
+}
+
+class Test2 extends Test{
+}
+
+class Test{
+
+ Test test;
+
+ public int start(){
+ test = test.next();
+ return 0;
+ }
+
+ public Test next() {
+ Test2 test2;
+ test2 = new Test2();
+ return test2;
+ }
+}
diff --git a/output/negative/ExtendMissing.java b/output/negative/ExtendMissing.java
new file mode 100644
index 0000000..72a487a
--- /dev/null
+++ b/output/negative/ExtendMissing.java
@@ -0,0 +1,12 @@
+class ExtendMissing {
+ public static void main(String[] a){
+ System.out.println(new Test().start());
+ }
+}
+
+class Test extends NotPresent { //TE
+
+ public int start(){
+ return 0;
+ }
+}