aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs151/pr124808/Test.java15
-rw-r--r--tests/bugs151/pr124808/TestAspect.java10
-rw-r--r--tests/src/org/aspectj/systemtest/ajc151/Ajc151Tests.java1
-rw-r--r--tests/src/org/aspectj/systemtest/ajc151/ajc151.xml9
4 files changed, 35 insertions, 0 deletions
diff --git a/tests/bugs151/pr124808/Test.java b/tests/bugs151/pr124808/Test.java
new file mode 100644
index 000000000..e0aebc012
--- /dev/null
+++ b/tests/bugs151/pr124808/Test.java
@@ -0,0 +1,15 @@
+import java.util.*;
+
+public class Test<T extends Integer> {
+ Set<T> ints = new HashSet<T>();
+
+ public Set<T> foo() {
+ return ints;
+ }
+
+
+ public static void main(String[] args) {
+ Test<Integer> t2 = new Test<Integer>();
+ Set<Integer> ints2 = t2.foo();
+ }
+}
diff --git a/tests/bugs151/pr124808/TestAspect.java b/tests/bugs151/pr124808/TestAspect.java
new file mode 100644
index 000000000..446f444de
--- /dev/null
+++ b/tests/bugs151/pr124808/TestAspect.java
@@ -0,0 +1,10 @@
+import java.util.*;
+
+public privileged aspect TestAspect {
+
+ pointcut gettingMemberCollection() : get(Set<Number+> *);
+
+ after() : gettingMemberCollection() {
+ System.err.println("GO Aspects! "+thisJoinPoint);
+ }
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc151/Ajc151Tests.java b/tests/src/org/aspectj/systemtest/ajc151/Ajc151Tests.java
index 396f2ed85..8b6e385d5 100644
--- a/tests/src/org/aspectj/systemtest/ajc151/Ajc151Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc151/Ajc151Tests.java
@@ -24,6 +24,7 @@ public class Ajc151Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
public void testHasMemberPackageProblem_pr124105() { runTest("hasMember problems with packages");}
public void testDifferentNumbersofTVars_pr124803() { runTest("generics and different numbers of type variables");}
public void testDifferentNumbersofTVars_pr124803_2() { runTest("generics and different numbers of type variables - classes");}
+ public void testParameterizedCollectionFieldMatching_pr124808() { runTest("parameterized collection fields matched via pointcut");}
/////////////////////////////////////////
public static Test suite() {
diff --git a/tests/src/org/aspectj/systemtest/ajc151/ajc151.xml b/tests/src/org/aspectj/systemtest/ajc151/ajc151.xml
index 5c578a1d6..ccb251c10 100644
--- a/tests/src/org/aspectj/systemtest/ajc151/ajc151.xml
+++ b/tests/src/org/aspectj/systemtest/ajc151/ajc151.xml
@@ -44,5 +44,14 @@
</stderr>
</run>
</ajc-test>
+
+ <ajc-test dir="bugs151/pr124808" title="parameterized collection fields matched via pointcut">
+ <compile files="Test.java,TestAspect.java" options="-1.5"/>
+ <run class="Test">
+ <stderr>
+ <line text="GO Aspects! get(Set Test.ints)"/>
+ </stderr>
+ </run>
+ </ajc-test>
</suite> \ No newline at end of file