aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs161
diff options
context:
space:
mode:
authoraclement <aclement>2008-05-08 21:13:45 +0000
committeraclement <aclement>2008-05-08 21:13:45 +0000
commit4e315bcea79925d24801acac5465982a683c6e7a (patch)
tree55938dcb32e73eb12af3f69621fa92db25105633 /tests/bugs161
parent1eab1ab1d16da7a243e6712fb051efef3161075d (diff)
downloadaspectj-4e315bcea79925d24801acac5465982a683c6e7a.tar.gz
aspectj-4e315bcea79925d24801acac5465982a683c6e7a.zip
231187: test and fix. Do the parameterization check after ITDs have applied
Diffstat (limited to 'tests/bugs161')
-rw-r--r--tests/bugs161/pr231187/Cement.java5
-rw-r--r--tests/bugs161/pr231187/ConcreteClass.java19
-rw-r--r--tests/bugs161/pr231187/Main.java14
-rw-r--r--tests/bugs161/pr231187/SuperClass.java8
-rw-r--r--tests/bugs161/pr231187/SuperClassAspect.aj12
-rw-r--r--tests/bugs161/pr231187/WetCement.java6
6 files changed, 64 insertions, 0 deletions
diff --git a/tests/bugs161/pr231187/Cement.java b/tests/bugs161/pr231187/Cement.java
new file mode 100644
index 000000000..3fd69d035
--- /dev/null
+++ b/tests/bugs161/pr231187/Cement.java
@@ -0,0 +1,5 @@
+package concrete;
+
+public interface Cement {
+ public int getWeight();
+}
diff --git a/tests/bugs161/pr231187/ConcreteClass.java b/tests/bugs161/pr231187/ConcreteClass.java
new file mode 100644
index 000000000..c0eb8af5c
--- /dev/null
+++ b/tests/bugs161/pr231187/ConcreteClass.java
@@ -0,0 +1,19 @@
+package concrete;
+
+import java.util.Vector;
+
+public class ConcreteClass extends SuperClass<WetCement> {
+
+ @Override
+ public Vector<WetCement> getSomeTs() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public void addSomeTs(Vector<WetCement> newTs) {
+ // TODO Auto-generated method stub
+ someTs.addAll(newTs);
+ }
+
+}
diff --git a/tests/bugs161/pr231187/Main.java b/tests/bugs161/pr231187/Main.java
new file mode 100644
index 000000000..2f98e15be
--- /dev/null
+++ b/tests/bugs161/pr231187/Main.java
@@ -0,0 +1,14 @@
+package concrete;
+
+import java.util.*;
+
+public class Main {
+ public static void main(String[] args) {
+ ConcreteClass cc = new ConcreteClass();
+ WetCement wc = new WetCement();
+ Vector<WetCement> v = new Vector<WetCement>();
+ v.add(wc);
+ cc.addSomeTs(v);
+ System.out.println("ran!");
+ }
+} \ No newline at end of file
diff --git a/tests/bugs161/pr231187/SuperClass.java b/tests/bugs161/pr231187/SuperClass.java
new file mode 100644
index 000000000..18c1fe669
--- /dev/null
+++ b/tests/bugs161/pr231187/SuperClass.java
@@ -0,0 +1,8 @@
+package concrete;
+import java.util.Vector;
+
+public abstract class SuperClass<T extends Cement> {
+ Vector<T> someTs = new Vector<T>();
+ public abstract Vector<T> getSomeTs();
+ public abstract void addSomeTs(Vector<T> newTs);
+}
diff --git a/tests/bugs161/pr231187/SuperClassAspect.aj b/tests/bugs161/pr231187/SuperClassAspect.aj
new file mode 100644
index 000000000..c37074499
--- /dev/null
+++ b/tests/bugs161/pr231187/SuperClassAspect.aj
@@ -0,0 +1,12 @@
+package concrete;
+
+import java.util.Vector;
+
+
+public aspect SuperClassAspect {
+ declare parents : WetCement implements Cement;
+
+ after(SuperClass sc, Vector cm) returning: execution(void SuperClass.addSomeTs(Vector)) && target(sc) && args(cm) {
+ // System.out.println(cm);
+ }
+}
diff --git a/tests/bugs161/pr231187/WetCement.java b/tests/bugs161/pr231187/WetCement.java
new file mode 100644
index 000000000..dfefde076
--- /dev/null
+++ b/tests/bugs161/pr231187/WetCement.java
@@ -0,0 +1,6 @@
+package concrete;
+
+public class WetCement {
+ boolean wet = true;
+ public int getWeight() { return 5; }
+}