From: wisberg Date: Tue, 25 Jan 2005 21:11:56 +0000 (+0000) Subject: @testcase PR83645 pertypewithin on interface X-Git-Tag: Root_AspectJ5_Development~66 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8e143992f8e5a8153798b35227c028fb515dae7b;p=aspectj.git @testcase PR83645 pertypewithin on interface --- 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