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