aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2009-04-30 20:29:38 +0000
committeraclement <aclement>2009-04-30 20:29:38 +0000
commit1fe559e2babe14a778e200b4efccd380af5bf16b (patch)
tree65eb8e902083391a1c1fd651e9f50f58c0cf9866
parentbd85862d023f3b8a7de01ffe3f5d2e2ef34fcaac (diff)
downloadaspectj-1fe559e2babe14a778e200b4efccd380af5bf16b.tar.gz
aspectj-1fe559e2babe14a778e200b4efccd380af5bf16b.zip
272825: test and fix: super method call with generic itds
-rw-r--r--tests/bugs165/pr272825/Concrete.java9
-rw-r--r--tests/bugs165/pr272825/GenericSuper.java13
-rw-r--r--tests/bugs165/pr272825/ITDOfMethod.aj8
-rw-r--r--tests/bugs165/pr272825/Main.java9
-rw-r--r--tests/src/org/aspectj/systemtest/ajc165/Ajc165Tests.java4
-rw-r--r--tests/src/org/aspectj/systemtest/ajc165/ajc165.xml14
6 files changed, 57 insertions, 0 deletions
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<Integer>{
+
+ @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<T> {
+
+ 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 @@
<run class="p.TestPointcutAnnotationAspect"/>
</ajc-test>
+ <ajc-test dir="bugs165/pr272825" title="generic ITD">
+ <compile files="Concrete.java GenericSuper.java ITDOfMethod.aj Main.java" options="-1.5"/>
+ <run class="Main">
+ <stdout>
+ <line text="In normal method"/>
+ <line text="else"/>
+ <line text="1"/>
+ <line text="In ITD method"/>
+ <line text="with"/>
+ <line text="2"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
</suite> \ No newline at end of file