diff options
author | aclement <aclement> | 2009-03-04 03:00:29 +0000 |
---|---|---|
committer | aclement <aclement> | 2009-03-04 03:00:29 +0000 |
commit | a717f689d51d8392d1f81e50556e25f26658294f (patch) | |
tree | a44cad48a1c033c83c2de16ddcde53e60aa34fd1 /tests/features164 | |
parent | b331fa862e3296cb26b3d6b47a5c8a4dfe2110a8 (diff) | |
download | aspectj-a717f689d51d8392d1f81e50556e25f26658294f.tar.gz aspectj-a717f689d51d8392d1f81e50556e25f26658294f.zip |
declaremixin: check signature of factory method
Diffstat (limited to 'tests/features164')
-rw-r--r-- | tests/features164/declareMixin/CaseJ.java | 17 | ||||
-rw-r--r-- | tests/features164/declareMixin/CaseK.java | 15 |
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 {} + |