From 11b3b0740b66f1d962b5179ece2f2d23e88f040b Mon Sep 17 00:00:00 2001 From: jhugunin Date: Thu, 10 Apr 2003 22:32:40 +0000 Subject: [PATCH] test for Bugzilla Bug 35725 Inter type declaration to base class not seen by derived class --- tests/ajcTests.xml | 7 +++++++ tests/bugs/interInherit/a_impl/AImpl.java | 8 ++++++++ tests/bugs/interInherit/a_impl/Af.java | 12 ++++++++++++ tests/bugs/interInherit/a_intf/A.java | 7 +++++++ tests/bugs/interInherit/b_impl/BImpl.java | 20 ++++++++++++++++++++ tests/bugs/interInherit/b_intf/B.java | 10 ++++++++++ tests/jimTests.xml | 1 + 7 files changed, 65 insertions(+) create mode 100644 tests/bugs/interInherit/a_impl/AImpl.java create mode 100644 tests/bugs/interInherit/a_impl/Af.java create mode 100644 tests/bugs/interInherit/a_intf/A.java create mode 100644 tests/bugs/interInherit/b_impl/BImpl.java create mode 100644 tests/bugs/interInherit/b_intf/B.java diff --git a/tests/ajcTests.xml b/tests/ajcTests.xml index 55014305b..97927ea16 100644 --- a/tests/ajcTests.xml +++ b/tests/ajcTests.xml @@ -5775,4 +5775,11 @@ + + + + + + diff --git a/tests/bugs/interInherit/a_impl/AImpl.java b/tests/bugs/interInherit/a_impl/AImpl.java new file mode 100644 index 000000000..65c9725ca --- /dev/null +++ b/tests/bugs/interInherit/a_impl/AImpl.java @@ -0,0 +1,8 @@ +package a_impl; + +import a_intf.A; + +public class AImpl + implements A +{ +} diff --git a/tests/bugs/interInherit/a_impl/Af.java b/tests/bugs/interInherit/a_impl/Af.java new file mode 100644 index 000000000..f7c0d158d --- /dev/null +++ b/tests/bugs/interInherit/a_impl/Af.java @@ -0,0 +1,12 @@ +package a_impl; + +import a_intf.A; + +aspect Af +{ + public A AImpl.f() + { + System.out.println( "f called" ); + return null; + } +} diff --git a/tests/bugs/interInherit/a_intf/A.java b/tests/bugs/interInherit/a_intf/A.java new file mode 100644 index 000000000..14e200d2e --- /dev/null +++ b/tests/bugs/interInherit/a_intf/A.java @@ -0,0 +1,7 @@ + +package a_intf; + +public interface A +{ + A f(); +} diff --git a/tests/bugs/interInherit/b_impl/BImpl.java b/tests/bugs/interInherit/b_impl/BImpl.java new file mode 100644 index 000000000..7d0f7a934 --- /dev/null +++ b/tests/bugs/interInherit/b_impl/BImpl.java @@ -0,0 +1,20 @@ +package b_impl; + +import a_impl.AImpl; +import b_intf.B; + +public class BImpl + extends AImpl + implements B +{ + public B g() + { + System.out.println( "g called" ); + return null; + } + + public static void main(String[] args) { + new BImpl().g(); + new BImpl().f(); + } +} diff --git a/tests/bugs/interInherit/b_intf/B.java b/tests/bugs/interInherit/b_intf/B.java new file mode 100644 index 000000000..d21644dbd --- /dev/null +++ b/tests/bugs/interInherit/b_intf/B.java @@ -0,0 +1,10 @@ + +package b_intf; + +import a_intf.A; + +public interface B + extends A +{ + B g(); +} diff --git a/tests/jimTests.xml b/tests/jimTests.xml index cc3257d9f..7664c3799 100644 --- a/tests/jimTests.xml +++ b/tests/jimTests.xml @@ -1,6 +1,7 @@ +