diff options
author | aclement <aclement> | 2006-10-06 15:43:34 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-10-06 15:43:34 +0000 |
commit | f176ce5c3f54b1401d7ca62edf22424bd546b263 (patch) | |
tree | ed6f65391416e05210d9fe81c4cc10663792995e | |
parent | c0ef7c724322530a361686fade5607ed0577bb87 (diff) | |
download | aspectj-f176ce5c3f54b1401d7ca62edf22424bd546b263.tar.gz aspectj-f176ce5c3f54b1401d7ca62edf22424bd546b263.zip |
tests for 156058 and 159983
-rw-r--r-- | tests/bugs153/pr156058/Bug2.java | 25 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java | 3 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc153/ajc153.xml | 7 |
3 files changed, 34 insertions, 1 deletions
diff --git a/tests/bugs153/pr156058/Bug2.java b/tests/bugs153/pr156058/Bug2.java new file mode 100644 index 000000000..229e7850e --- /dev/null +++ b/tests/bugs153/pr156058/Bug2.java @@ -0,0 +1,25 @@ +aspect MyAspect implements MyInterface<MyClass> { + before() : MyAspect1<MyClass>.myPointcutInInterface(){ } +} + +class MyClass {} + +interface MyInterface<T>{ + public abstract static aspect MyAspect1<T> { + public final pointcut myPointcutInInterface() : call(T *(..)); + } +} + +public class Bug2 { + public static void main(MyClass[]argv) { + new Bug2().callit(); + } + + public MyClass callit() { + return null; + } +} + +aspect MyAspect2 implements MyInterface<String> { + before(): MyAspect1<String>.myPointcutInInterface() {} // shouldn't match... since the return type of callit is MyClass +}
\ No newline at end of file diff --git a/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java b/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java index 3aa129227..e1838f627 100644 --- a/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java @@ -27,8 +27,9 @@ public class Ajc153Tests extends org.aspectj.testing.XMLBasedAjcTestCase { // public void testArgnamesAndJavac_pr148381() { runTest("argNames and javac");} // public void testCFlowXMLAspectLTW_pr149096() { runTest("cflow xml concrete aspect"); } // public void testAmbiguousBinding_pr121805() { runTest("ambiguous binding");} -// public void testNoIllegalStateExceptionWithGenericInnerAspect_pr156058() { runTest("no IllegalStateException with generic inner aspect"); } // public void testNegatedAnnotationMatchingProblem_pr153464() { runTest("negated annotation matching problem");} + public void testNoIllegalStateExceptionWithGenericInnerAspect_pr156058() { runTest("no IllegalStateException with generic inner aspect"); } + public void testNoIllegalStateExceptionWithGenericInnerAspect_pr156058_2() { runTest("no IllegalStateException with generic inner aspect - 2"); } public void testDeclareMethodAnnotations_pr159143() { runTest("declare method annotations");} public void testVisibilityProblem_pr149071() { runTest("visibility problem");} public void testMissingLineNumbersInStacktraceAfter_pr145442() { runTest("missing line numbers in stacktrace after");} diff --git a/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml b/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml index 7e3f4e888..a6ddc8ec8 100644 --- a/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml +++ b/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml @@ -66,6 +66,13 @@ </compile> </ajc-test> + <ajc-test dir="bugs153/pr156058" title="no IllegalStateException with generic inner aspect - 2"> + <compile files="Bug2.java" options="-1.5 -showWeaveInfo"> + <message kind="weave" text="Join point 'method-call(MyClass Bug2.callit())' in Type 'Bug2' (Bug2.java:15) advised by before advice from 'MyAspect' (Bug2.java:2)"/> + <message kind="warning" line="24" text="advice defined in MyAspect2 has not been applied [Xlint:adviceDidNotMatch]"/> + </compile> + </ajc-test> + <ajc-test dir="bugs153/pr153490" title="no illegal state exception from AsmDelegate - 1"> <compile files="Foo.java" options="-1.5" classpath="jarForFoo.jar" /> </ajc-test> |