From: aclement Date: Fri, 6 Oct 2006 15:43:34 +0000 (+0000) Subject: tests for 156058 and 159983 X-Git-Tag: BEFORE_133532~8 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f176ce5c3f54b1401d7ca62edf22424bd546b263;p=aspectj.git tests for 156058 and 159983 --- 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 { + before() : MyAspect1.myPointcutInInterface(){ } +} + +class MyClass {} + +interface MyInterface{ + public abstract static aspect MyAspect1 { + 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 { + before(): MyAspect1.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 @@ + + + + + + +