Browse Source

Test for Bug 60936

   error message for constructor-execution pcd
tags/V1_2_0
aclement 20 years ago
parent
commit
15c8bf9394
1 changed files with 18 additions and 0 deletions
  1. 18
    0
      tests/bugs/InterfaceConstructor.java

+ 18
- 0
tests/bugs/InterfaceConstructor.java View File

@@ -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 +
}
}

Loading…
Cancel
Save