diff options
author | aclement <aclement> | 2006-01-23 14:25:06 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-01-23 14:25:06 +0000 |
commit | 01a8b2eb36e1a34c80697c2034f9657b74dc281a (patch) | |
tree | dcda6cc1131c03ad988a285aba5b5bfb300fb81c /tests | |
parent | 8676df9bca4e5e169206f314c8ad5d3da38bc28e (diff) | |
download | aspectj-01a8b2eb36e1a34c80697c2034f9657b74dc281a.tar.gz aspectj-01a8b2eb36e1a34c80697c2034f9657b74dc281a.zip |
test and fix for 124808
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bugs151/pr124808/Test.java | 15 | ||||
-rw-r--r-- | tests/bugs151/pr124808/TestAspect.java | 10 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc151/Ajc151Tests.java | 1 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc151/ajc151.xml | 9 |
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 |