aboutsummaryrefslogtreecommitdiffstats
path: root/tests/features164/declareMixin/CaseN.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/features164/declareMixin/CaseN.java')
-rw-r--r--tests/features164/declareMixin/CaseN.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/features164/declareMixin/CaseN.java b/tests/features164/declareMixin/CaseN.java
new file mode 100644
index 000000000..54b5f34dd
--- /dev/null
+++ b/tests/features164/declareMixin/CaseN.java
@@ -0,0 +1,24 @@
+// TESTING: factory returns class but interface specified - this is OK
+import org.aspectj.lang.annotation.*;
+
+public class CaseN {
+ public static void main(String[]argv) {
+ ((I)new CaseN()).foo();
+ }
+}
+
+aspect X {
+ @DeclareMixin(value="CaseN",interfaces={I.class})
+ public static C createImplementation1() {return new C();}
+
+}
+
+interface I {
+ void foo();
+}
+
+class C implements I {
+ public void foo() {
+ System.out.println("foo() running");
+ }
+}