diff options
-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 |