aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs150
diff options
context:
space:
mode:
authoracolyer <acolyer>2005-08-25 12:52:12 +0000
committeracolyer <acolyer>2005-08-25 12:52:12 +0000
commit2172ceec0382a30dd7c8bbcf4e983b70225243a4 (patch)
treee5138bd599771eb27a008e8c300bce66a30bb2d4 /tests/bugs150
parent4d2c46f3f99d7ca0bbfbdbac6adb92f64a851653 (diff)
downloadaspectj-2172ceec0382a30dd7c8bbcf4e983b70225243a4.tar.gz
aspectj-2172ceec0382a30dd7c8bbcf4e983b70225243a4.zip
tests for pr107898 and pr72668
Diffstat (limited to 'tests/bugs150')
-rw-r--r--tests/bugs150/PointcutsInInterfaces.aj15
-rw-r--r--tests/bugs150/pr107898.aj17
-rw-r--r--tests/bugs150/pr72668.aj20
3 files changed, 52 insertions, 0 deletions
diff --git a/tests/bugs150/PointcutsInInterfaces.aj b/tests/bugs150/PointcutsInInterfaces.aj
new file mode 100644
index 000000000..18e825c97
--- /dev/null
+++ b/tests/bugs150/PointcutsInInterfaces.aj
@@ -0,0 +1,15 @@
+public interface PointcutsInInterfaces {
+
+ public pointcut foo() : execution(* *(..));
+
+}
+
+class C {
+ void foo() {}
+}
+
+aspect A {
+
+ declare warning : PointcutsInInterfaces.foo() : "aha!";
+
+} \ No newline at end of file
diff --git a/tests/bugs150/pr107898.aj b/tests/bugs150/pr107898.aj
new file mode 100644
index 000000000..272d2dcab
--- /dev/null
+++ b/tests/bugs150/pr107898.aj
@@ -0,0 +1,17 @@
+class Bug_Provider {
+ public void enable_bug(Object argument) {}
+}
+
+class Null_Provider<T> extends Bug_Provider {
+ public T get_typed_null() {
+ return null;
+ }
+}
+
+public class pr107898 {
+ public static void main(String[] args) {
+ Null_Provider<Integer> null_provider = new Null_Provider<Integer>() {};
+ null_provider.enable_bug(null);
+ Integer i = null_provider.get_typed_null(); // type mismatch
+ }
+} \ No newline at end of file
diff --git a/tests/bugs150/pr72668.aj b/tests/bugs150/pr72668.aj
new file mode 100644
index 000000000..6c8dac4ba
--- /dev/null
+++ b/tests/bugs150/pr72668.aj
@@ -0,0 +1,20 @@
+public aspect pr72668 {
+
+ Number[] getThoseInts() {
+ return new Integer[0];
+ }
+
+ declare warning : execution(Object[] *(..)) : "should not match";
+
+ @org.aspectj.lang.annotation.SuppressAjWarnings("adviceDidNotMatch")
+ Object[] around() : execution(*[] *(..)) {
+ Object[] ret = proceed();
+ return (Object[]) ret.clone();
+ }
+
+ Integer[] around() : execution(*[] *(..)) {
+ Number[] ret = proceed();
+ return (Integer[]) ret.clone();
+ }
+
+} \ No newline at end of file