From 15c8bf939467b06856b52624dea3dea3a23b3b1b Mon Sep 17 00:00:00 2001 From: aclement Date: Wed, 12 May 2004 13:03:09 +0000 Subject: [PATCH] Test for Bug 60936 error message for constructor-execution pcd --- tests/bugs/InterfaceConstructor.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/bugs/InterfaceConstructor.java diff --git a/tests/bugs/InterfaceConstructor.java b/tests/bugs/InterfaceConstructor.java new file mode 100644 index 000000000..9d10b2a6d --- /dev/null +++ b/tests/bugs/InterfaceConstructor.java @@ -0,0 +1,18 @@ +interface I { } + +public class InterfaceConstructor implements I { + public static void main(String[] args) { + new InterfaceConstructor(); + } +} + +aspect NoSuchJP { + before(): execution(I.new(..)) { // error expected + // No constructor-execution on interface type + } + + before(): execution(I+.new(..)) { // no error + // This is OK, as there is a + + } + +} \ No newline at end of file -- 2.39.5