aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs170
diff options
context:
space:
mode:
authorAndy Clement <aclement@vmware.com>2012-03-02 08:17:44 -0800
committerAndy Clement <aclement@vmware.com>2012-03-02 08:17:44 -0800
commitf37c56e02982a1043e7821bf033b58495f8a6b74 (patch)
tree929ae23ef3663a073ed2f7e451faf52648386578 /tests/bugs170
parent548f8b6a118d06874d511ffcc13602b4ec756d9a (diff)
downloadaspectj-f37c56e02982a1043e7821bf033b58495f8a6b74.tar.gz
aspectj-f37c56e02982a1043e7821bf033b58495f8a6b74.zip
fix for 371998
Use resolved type pattern rather than re-resolving
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;}
+}