diff options
author | acolyer <acolyer> | 2004-01-07 15:57:25 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2004-01-07 15:57:25 +0000 |
commit | 7322131ad6d3c5c14114a6b7945757f45d438112 (patch) | |
tree | d19e5d14588607c94eb9975e87330f68d8174f1f /tests | |
parent | 01055e854df883746321b955bd5b9b41a840feda (diff) | |
download | aspectj-7322131ad6d3c5c14114a6b7945757f45d438112.tar.gz aspectj-7322131ad6d3c5c14114a6b7945757f45d438112.zip |
fix for pr 47754, itd of static method on interface
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ajcTests.xml | 8 | ||||
-rw-r--r-- | tests/bugs/StaticInterfaceMethods.java | 10 |
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 |