From 6520dac1893902762b996d9359b239155c62ac54 Mon Sep 17 00:00:00 2001 From: jochen Date: Wed, 5 May 1999 21:01:18 +0000 Subject: [PATCH] Parent for inner class added git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@781 379699f6-c40d-0410-875b-85095c16579e --- jode/test/InnerClass.java | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/jode/test/InnerClass.java b/jode/test/InnerClass.java index becc9c2..ed9dce5 100644 --- a/jode/test/InnerClass.java +++ b/jode/test/InnerClass.java @@ -23,12 +23,22 @@ public class InnerClass { private int x; + class Parent + { + int a = 1; + protected int x; + + void ambiguous() { + System.err.println("Parent"); + } + } + class Inner { int a = 4; private int b = x; - class InnerInner + class InnerInner extends Parent { public int getB() { @@ -41,11 +51,20 @@ public class InnerClass } public InnerInner(int c) { - x = c; - a = b; + this.x = c; + InnerClass.this.x = b; + this.a = b; + Inner.this.a = c; + this.ambiguous(); + Inner.this.ambiguous(); + InnerClass.this.ambiguous(); } } + void ambiguous() { + System.err.println("Inner"); + } + private int getB() { return b; } @@ -61,9 +80,15 @@ public class InnerClass Extended(Inner inner) { inner.super(3); + this.ambiguous(); + InnerClass.this.ambiguous(); } } + void ambiguous() { + System.err.println("InnerClass"); + } + private static Inner createInner(InnerClass outer) { return outer.new Inner(); }