aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoracolyer <acolyer>2006-06-20 11:12:49 +0000
committeracolyer <acolyer>2006-06-20 11:12:49 +0000
commit791f8a7c3f37d9b10b8ad1692df998733bbc2f20 (patch)
tree114a540dfa4ce5e29fdb33f5b22045356e82e437 /tests
parent2257fc7638ae9e939cbec9994464a5e1ae36c9ba (diff)
downloadaspectj-791f8a7c3f37d9b10b8ad1692df998733bbc2f20.tar.gz
aspectj-791f8a7c3f37d9b10b8ad1692df998733bbc2f20.zip
tests and fix for pr147845, generic abstract aspect 3+ deep hierarchies
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs152/pr147845/GenericAspectHierarchy.aj30
-rw-r--r--tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java1
-rw-r--r--tests/src/org/aspectj/systemtest/ajc152/ajc152.xml7
3 files changed, 38 insertions, 0 deletions
diff --git a/tests/bugs152/pr147845/GenericAspectHierarchy.aj b/tests/bugs152/pr147845/GenericAspectHierarchy.aj
new file mode 100644
index 000000000..b9c483105
--- /dev/null
+++ b/tests/bugs152/pr147845/GenericAspectHierarchy.aj
@@ -0,0 +1,30 @@
+interface MyBase { void foo(); };
+interface MyMarker extends MyBase { void bar(); }
+
+abstract aspect Base<A extends MyBase> {
+
+ pointcut somePC() : execution(* A.*(..));
+
+ declare warning : somePC() : "a match";
+
+}
+
+abstract aspect Middle<B extends MyBase> extends Base<B> {}
+
+aspect Sub extends Middle<MyMarker> {}
+
+
+class C1 implements MyBase {
+
+ public void foo() {}
+
+}
+
+class C2 implements MyMarker {
+
+ public void foo() {} // CW L 25
+
+ public void bar() {} // CW L 27
+
+
+} \ No newline at end of file
diff --git a/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java b/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java
index 6871867d8..f0be4c6ee 100644
--- a/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java
@@ -97,6 +97,7 @@ public class Ajc152Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
public void testDoubleAnnotationMatching_pr138223() { runTest("Double at annotation matching (no binding)");}
public void testSuperCallsInAtAspectJAdvice_pr139749() { runTest("Super calls in @AspectJ advice");}
public void testNoClassCastExceptionWithPerThis_pr138286() { runTest("No ClassCastException with perThis");}
+ public void testGenericAspectHierarchyWithBounds_pr147845() { runTest("Generic abstract aspect hierarchy with bounds"); }
public void testDeclareAtMethodRelationship_pr143924() {
//AsmManager.setReporting("c:/debug.txt",true,true,true,true);
diff --git a/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml b/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml
index 1525089a0..d6a132ee5 100644
--- a/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml
+++ b/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml
@@ -712,5 +712,12 @@
</stderr>
</run>
</ajc-test>
+
+ <ajc-test dir="bugs152/pr147845" title="Generic abstract aspect hierarchy with bounds">
+ <compile files="GenericAspectHierarchy.aj" options="-1.5">
+ <message kind="warning" line="25" text="a match"/>
+ <message kind="warning" line="27" text="a match"/>
+ </compile>
+ </ajc-test>
</suite> \ No newline at end of file