From 8e143992f8e5a8153798b35227c028fb515dae7b Mon Sep 17 00:00:00 2001 From: wisberg Date: Tue, 25 Jan 2005 21:11:56 +0000 Subject: [PATCH] @testcase PR83645 pertypewithin on interface --- tests/ajcTestsFailing.xml | 5 +++++ tests/bugs150/PR83645.java | 25 +++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 tests/bugs150/PR83645.java 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 @@ + + + + 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 -- 2.39.5