summaryrefslogtreecommitdiffstats
path: root/tests/bugs150
diff options
context:
space:
mode:
authoracolyer <acolyer>2005-08-30 17:07:09 +0000
committeracolyer <acolyer>2005-08-30 17:07:09 +0000
commitdca288a38857115c46e83ca2c548377014c42b7d (patch)
treeb9e063c2c0c00e9e2bd50854c790ec96a31dd869 /tests/bugs150
parent3fa3a93b462e19407b015082365b8b9f6b301915 (diff)
downloadaspectj-dca288a38857115c46e83ca2c548377014c42b7d.tar.gz
aspectj-dca288a38857115c46e83ca2c548377014c42b7d.zip
tests for pr107953 and newsgroup reported issue of varargs matching with type variable vararg
Diffstat (limited to 'tests/bugs150')
-rw-r--r--tests/bugs150/ParameterizedVarArgMatch.aj17
-rw-r--r--tests/bugs150/pr107953.java18
2 files changed, 35 insertions, 0 deletions
diff --git a/tests/bugs150/ParameterizedVarArgMatch.aj b/tests/bugs150/ParameterizedVarArgMatch.aj
new file mode 100644
index 000000000..5f0bf3f44
--- /dev/null
+++ b/tests/bugs150/ParameterizedVarArgMatch.aj
@@ -0,0 +1,17 @@
+class Test1<E> {
+ public void method1(E...args) {
+ }
+}
+
+public aspect ParameterizedVarArgMatch {
+
+ public static void main(String[] args) {
+ new Test1<String>().method1("a","b","c");
+ }
+
+
+ after(Test1 test1, Object[] arg) returning:
+ execution(* Test1.method1(Object...)) && target(test1) && args(arg) {
+ System.out.println("got here");
+ }
+} \ No newline at end of file
diff --git a/tests/bugs150/pr107953.java b/tests/bugs150/pr107953.java
new file mode 100644
index 000000000..8e42817c1
--- /dev/null
+++ b/tests/bugs150/pr107953.java
@@ -0,0 +1,18 @@
+import java.lang.annotation.*;
+import org.aspectj.lang.annotation.*;
+
+@Aspect
+public class pr107953 {
+
+ @AfterThrowing(pointcut="execution(* Foo.*(..))",throwing="RuntimeException")
+ public void missingBindingOfThrowingFormal() {
+ System.out.println("failure");
+ }
+
+}
+
+class Foo {
+ void bar() {
+ throw new RuntimeException();
+ }
+} \ No newline at end of file