diff options
author | jhugunin <jhugunin> | 2003-05-19 18:06:04 +0000 |
---|---|---|
committer | jhugunin <jhugunin> | 2003-05-19 18:06:04 +0000 |
commit | 2072ac11448e493e26ab7ff818ce26c6ef33c19c (patch) | |
tree | 54f5535acef911434dcfa15d6386f3b51b3ffb0d /tests/bugs | |
parent | 8463bc6ed6ac00e71a09b9a3738c3aa5619f529f (diff) | |
download | aspectj-2072ac11448e493e26ab7ff818ce26c6ef33c19c.tar.gz aspectj-2072ac11448e493e26ab7ff818ce26c6ef33c19c.zip |
fix and test Bugzilla Bug 37739
Unexpected Xlint:unresolvableMember warning with withincode
Diffstat (limited to 'tests/bugs')
-rw-r--r-- | tests/bugs/CatchSig.java | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/tests/bugs/CatchSig.java b/tests/bugs/CatchSig.java new file mode 100644 index 000000000..81d960416 --- /dev/null +++ b/tests/bugs/CatchSig.java @@ -0,0 +1,51 @@ +/* + * Bugzilla Bug 37739 + Unexpected Xlint:unresolvableMember warning with withincode + */ +public class CatchSig { + CatchSig(Class type) {} + + CatchSig() { + this(String.class); + } + + public static void main(String[] args) { + new CatchSig(); + new B().test(); + new B().test2(); + B.findClass(); + } +} + +class B extends CatchSig { + public B() { + super(findClass()); + } + + static Class findClass() { + return B.class; + } + + public void test() { + } + + public void test2() { + test(); + } +} + +aspect C { + void around() : + (call (void B.test()) && + withincode (void B.test2())) { + System.out.println("test from test2"); + proceed(); + } + + before(): call(Class B.findClass()) { + System.out.println("from: " + thisEnclosingJoinPointStaticPart); + } + before(): call(Class B.findClass()) && withincode(B.new()) { + System.out.println("from B.new()"); + } +} |