diff options
author | wisberg <wisberg> | 2005-01-25 21:11:56 +0000 |
---|---|---|
committer | wisberg <wisberg> | 2005-01-25 21:11:56 +0000 |
commit | 8e143992f8e5a8153798b35227c028fb515dae7b (patch) | |
tree | b44c18fd91d41fa7f749b34039e82c2466d58ec2 /tests | |
parent | 1b01255892ef222c14fea25b5db77208f1f6bb13 (diff) | |
download | aspectj-8e143992f8e5a8153798b35227c028fb515dae7b.tar.gz aspectj-8e143992f8e5a8153798b35227c028fb515dae7b.zip |
@testcase PR83645 pertypewithin on interface
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ajcTestsFailing.xml | 5 | ||||
-rw-r--r-- | tests/bugs150/PR83645.java | 25 |
2 files changed, 30 insertions, 0 deletions
diff --git a/tests/ajcTestsFailing.xml b/tests/ajcTestsFailing.xml index 167f12d9e..b86bc31a3 100644 --- a/tests/ajcTestsFailing.xml +++ b/tests/ajcTestsFailing.xml @@ -153,4 +153,9 @@ <run class="Test_AroundVarBug"/> </ajc-test> + <ajc-test dir="bugs150" pr="83645" + title="pertypewithin on interface"> + <compile files="PR83645.java"/> + <run class="PR83645"/> + </ajc-test> </suite> diff --git a/tests/bugs150/PR83645.java b/tests/bugs150/PR83645.java new file mode 100644 index 000000000..fa64a9cb8 --- /dev/null +++ b/tests/bugs150/PR83645.java @@ -0,0 +1,25 @@ + +import org.aspectj.lang.NoAspectBoundException; + +interface IP {} + +/** @testcase PR83645 pertypewithin on interface */ +public class PR83645 implements IP { + public static void main(String[] args) { + try { + boolean yes = (PT.aspectOf(IP.class) instanceof PT); + throw new Error("expected NoAspectBoundException, got instance?: " + yes); + } catch (NoAspectBoundException e) { + // ok + } + } +} +aspect PT pertypewithin(IP+) { + static int INDEX; + final int index = INDEX++; + public PT() { + } + public String toString() { + return "me " + index; + } +}
\ No newline at end of file |