aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs170
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bugs170')
-rw-r--r--tests/bugs170/pr371998/AspectTest.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/bugs170/pr371998/AspectTest.java b/tests/bugs170/pr371998/AspectTest.java
new file mode 100644
index 000000000..38bc68ee2
--- /dev/null
+++ b/tests/bugs170/pr371998/AspectTest.java
@@ -0,0 +1,32 @@
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.DeclareParents;
+
+@Aspect
+public class AspectTest {
+
+ public AspectTest() {}
+
+ @DeclareParents(value="java.lang.Runnable+ || java.util.concurrent.Callable+", defaultImpl=XImpl.class)
+ //@DeclareParents(value="java.lang.Runnable+", defaultImpl=XImpl.class)
+ private X xImpl;
+
+ public static void main(String []argv) {
+ ((X)new Foo()).xxx();
+ ((X)new Bar()).xxx();
+ }
+
+}
+ interface X { void xxx();}
+ class XImpl implements X {
+ public XImpl() {}
+ public void xxx() {}
+ }
+
+
+class Foo implements Runnable {
+ public void run() {}
+}
+
+class Bar implements java.util.concurrent.Callable {
+ public Object call() {return null;}
+}