aboutsummaryrefslogtreecommitdiffstats
path: root/tests/features164
diff options
context:
space:
mode:
authoraclement <aclement>2009-03-04 03:00:29 +0000
committeraclement <aclement>2009-03-04 03:00:29 +0000
commita717f689d51d8392d1f81e50556e25f26658294f (patch)
treea44cad48a1c033c83c2de16ddcde53e60aa34fd1 /tests/features164
parentb331fa862e3296cb26b3d6b47a5c8a4dfe2110a8 (diff)
downloadaspectj-a717f689d51d8392d1f81e50556e25f26658294f.tar.gz
aspectj-a717f689d51d8392d1f81e50556e25f26658294f.zip
declaremixin: check signature of factory method
Diffstat (limited to 'tests/features164')
-rw-r--r--tests/features164/declareMixin/CaseJ.java17
-rw-r--r--tests/features164/declareMixin/CaseK.java15
2 files changed, 32 insertions, 0 deletions
diff --git a/tests/features164/declareMixin/CaseJ.java b/tests/features164/declareMixin/CaseJ.java
new file mode 100644
index 000000000..8b33faf6c
--- /dev/null
+++ b/tests/features164/declareMixin/CaseJ.java
@@ -0,0 +1,17 @@
+// TESTING: invalid return type for factory method
+import org.aspectj.lang.annotation.*;
+
+public class CaseJ {
+ public static void main(String[]argv) { }
+}
+
+aspect X {
+ @DeclareMixin("A")
+ public static void createImplementation1() {}
+
+ @DeclareMixin("A")
+ public static int createImplementation2(Object o) {return 2;}
+}
+
+interface I {}
+
diff --git a/tests/features164/declareMixin/CaseK.java b/tests/features164/declareMixin/CaseK.java
new file mode 100644
index 000000000..c41d7363b
--- /dev/null
+++ b/tests/features164/declareMixin/CaseK.java
@@ -0,0 +1,15 @@
+// TESTING: too many arguments to the factory method
+import org.aspectj.lang.annotation.*;
+
+public class CaseK {
+ public static void main(String[]argv) { }
+}
+
+aspect X {
+ @DeclareMixin("A")
+ public static I createImplementation1(String s,long foo) {return null;}
+
+}
+
+interface I {}
+