diff options
Diffstat (limited to 'tests/bugs')
-rw-r--r-- | tests/bugs/InterfaceConstructor.java | 18 |
1 files changed, 18 insertions, 0 deletions
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 |