From 441f1cc722a196c3ea7b48276351531e52aaaaf6 Mon Sep 17 00:00:00 2001 From: aclement Date: Wed, 14 Sep 2005 17:32:19 +0000 Subject: [PATCH] test for pr102210 --- tests/bugs150/PR102210.java | 34 +++++++++++++++++++ .../systemtest/ajc150/Ajc150Tests.java | 1 + .../org/aspectj/systemtest/ajc150/ajc150.xml | 16 ++++++++- 3 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 tests/bugs150/PR102210.java diff --git a/tests/bugs150/PR102210.java b/tests/bugs150/PR102210.java new file mode 100644 index 000000000..3c1046507 --- /dev/null +++ b/tests/bugs150/PR102210.java @@ -0,0 +1,34 @@ +import java.util.*; + +public aspect PR102210 { + + pointcut complex(List list): + (execution(public * *(String, List)) && args(*,list)) || + (execution(public * *(String, List, String)) && args(*,list,*)) || + (execution(public * *(String, String[], List, String)) && args(*,*,list,*)); + + before(List l): complex(l) { + System.err.println("List size is "+l.size()); + } + + public static void main(String []argv) { + List l = new ArrayList(); + l.add("."); + m1("xxx",l); + l.add("."); + m2("xxx",l,"yyy"); + l.add("."); + m3("xxx",new String[]{"xxx","yyy"},l,"zzz"); + } + + public static void m1(String a,List b) { + System.err.println("m1 running"); + } + public static void m2(String a,List b,String c) { + System.err.println("m2 running"); + } + public static void m3(String a,String[] b,List c,String d) { + System.err.println("m3 running"); + } + +} diff --git a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java index b657a7cfd..dd59979fb 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java @@ -195,6 +195,7 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase { public void testSyntaxErrorNPE_pr103266() {runTest("NPE on syntax error");} public void testFinalAbstractClass_pr109486() { runTest("Internal compiler error (ClassParser.java:242)");} + //public void testComplexBinding_pr102210() { runTest("NullPointerException trying to compile");} public void testIllegalStateExceptionOnNestedParameterizedType_pr106634() { runTest("IllegalStateException unpacking signature of nested parameterized type"); diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml index a33a914df..5f696d89f 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml +++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml @@ -70,7 +70,21 @@ - + + + + + + + + + + + + + + + -- 2.39.5