aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ajcTests.xml8
-rw-r--r--tests/bugs/StaticInterfaceMethods.java10
2 files changed, 18 insertions, 0 deletions
diff --git a/tests/ajcTests.xml b/tests/ajcTests.xml
index 3b834af69..cdeece3b6 100644
--- a/tests/ajcTests.xml
+++ b/tests/ajcTests.xml
@@ -6835,4 +6835,12 @@
<message kind="error" line="6" text="Unhandled exception"/>
</compile>
</ajc-test>
+
+ <ajc-test dir="bugs" pr="47754"
+ title="static method introduction on interfaces, should not be allowed">
+ <compile files="StaticInterfaceMethods.java">
+ <message kind="error" line="7" text="methods in interfaces cannot be declared static"/>
+ </compile>
+ </ajc-test>
+
</suite>
diff --git a/tests/bugs/StaticInterfaceMethods.java b/tests/bugs/StaticInterfaceMethods.java
new file mode 100644
index 000000000..fb08f0db4
--- /dev/null
+++ b/tests/bugs/StaticInterfaceMethods.java
@@ -0,0 +1,10 @@
+interface StaticInterfaceMethods {
+
+}
+
+aspect A {
+
+ static int StaticInterfaceMethods.aMethod() {
+ return 1;
+ }
+} \ No newline at end of file