]> source.dussan.org Git - aspectj.git/commitdiff
Test for Bug 60936
authoraclement <aclement>
Wed, 12 May 2004 13:03:09 +0000 (13:03 +0000)
committeraclement <aclement>
Wed, 12 May 2004 13:03:09 +0000 (13:03 +0000)
   error message for constructor-execution pcd

tests/bugs/InterfaceConstructor.java [new file with mode: 0644]

diff --git a/tests/bugs/InterfaceConstructor.java b/tests/bugs/InterfaceConstructor.java
new file mode 100644 (file)
index 0000000..9d10b2a
--- /dev/null
@@ -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