From 1fe559e2babe14a778e200b4efccd380af5bf16b Mon Sep 17 00:00:00 2001 From: aclement Date: Thu, 30 Apr 2009 20:29:38 +0000 Subject: [PATCH] 272825: test and fix: super method call with generic itds --- tests/bugs165/pr272825/Concrete.java | 9 +++++++++ tests/bugs165/pr272825/GenericSuper.java | 13 +++++++++++++ tests/bugs165/pr272825/ITDOfMethod.aj | 8 ++++++++ tests/bugs165/pr272825/Main.java | 9 +++++++++ .../org/aspectj/systemtest/ajc165/Ajc165Tests.java | 4 ++++ tests/src/org/aspectj/systemtest/ajc165/ajc165.xml | 14 ++++++++++++++ 6 files changed, 57 insertions(+) create mode 100644 tests/bugs165/pr272825/Concrete.java create mode 100644 tests/bugs165/pr272825/GenericSuper.java create mode 100644 tests/bugs165/pr272825/ITDOfMethod.aj create mode 100644 tests/bugs165/pr272825/Main.java diff --git a/tests/bugs165/pr272825/Concrete.java b/tests/bugs165/pr272825/Concrete.java new file mode 100644 index 000000000..5ae8a52b5 --- /dev/null +++ b/tests/bugs165/pr272825/Concrete.java @@ -0,0 +1,9 @@ +public class Concrete extends GenericSuper{ + + @Override + public void doSomethingElseWith(Integer t) { + System.out.println("In normal method"); + super.doSomethingElseWith(t); + } + +} diff --git a/tests/bugs165/pr272825/GenericSuper.java b/tests/bugs165/pr272825/GenericSuper.java new file mode 100644 index 000000000..fef8ff23f --- /dev/null +++ b/tests/bugs165/pr272825/GenericSuper.java @@ -0,0 +1,13 @@ +public class GenericSuper { + + public void doSomethingWith(T t) { + System.out.println("with"); + System.out.println(t.toString()); + } + + public void doSomethingElseWith(T t) { + System.out.println("else"); + System.out.println(t); + } + +} diff --git a/tests/bugs165/pr272825/ITDOfMethod.aj b/tests/bugs165/pr272825/ITDOfMethod.aj new file mode 100644 index 000000000..77988aa76 --- /dev/null +++ b/tests/bugs165/pr272825/ITDOfMethod.aj @@ -0,0 +1,8 @@ +public aspect ITDOfMethod { + + public void Concrete.doSomethingWith(Integer i) { + System.out.println("In ITD method"); + super.doSomethingWith(i); + } + +} diff --git a/tests/bugs165/pr272825/Main.java b/tests/bugs165/pr272825/Main.java new file mode 100644 index 000000000..9fb8cf08e --- /dev/null +++ b/tests/bugs165/pr272825/Main.java @@ -0,0 +1,9 @@ +public class Main { + + public static void main(String args[]) { + Concrete c = new Concrete(); + c.doSomethingElseWith(1); + c.doSomethingWith(2); + } + +} diff --git a/tests/src/org/aspectj/systemtest/ajc165/Ajc165Tests.java b/tests/src/org/aspectj/systemtest/ajc165/Ajc165Tests.java index e405210f1..dcb857f8d 100644 --- a/tests/src/org/aspectj/systemtest/ajc165/Ajc165Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc165/Ajc165Tests.java @@ -57,6 +57,10 @@ public class Ajc165Tests extends org.aspectj.testing.XMLBasedAjcTestCase { runTest("around call npe"); } + public void testGenericITD_pr272825() { + runTest("generic ITD"); + } + // --- public static Test suite() { diff --git a/tests/src/org/aspectj/systemtest/ajc165/ajc165.xml b/tests/src/org/aspectj/systemtest/ajc165/ajc165.xml index 723a4e0ce..c15e75830 100644 --- a/tests/src/org/aspectj/systemtest/ajc165/ajc165.xml +++ b/tests/src/org/aspectj/systemtest/ajc165/ajc165.xml @@ -32,4 +32,18 @@ + + + + + + + + + + + + + + \ No newline at end of file -- 2.39.5