diff options
Diffstat (limited to 'tests/features164/declareMixin/CaseL.java')
-rw-r--r-- | tests/features164/declareMixin/CaseL.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/features164/declareMixin/CaseL.java b/tests/features164/declareMixin/CaseL.java new file mode 100644 index 000000000..6c505b944 --- /dev/null +++ b/tests/features164/declareMixin/CaseL.java @@ -0,0 +1,20 @@ +// TESTING: mixin of a class - should be an error +import org.aspectj.lang.annotation.*; + +public class CaseL { + public static void main(String[]argv) { + ((C)new CaseL()).foo(); + } +} + +aspect X { + @DeclareMixin("CaseL") + public static C createImplementation1() {return new C();} + +} + +class C { + void foo() { + System.out.println("foo() running"); + } +} |