diff options
Diffstat (limited to 'tests/pureJava/LocalInterfaceCE.java')
-rw-r--r-- | tests/pureJava/LocalInterfaceCE.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/pureJava/LocalInterfaceCE.java b/tests/pureJava/LocalInterfaceCE.java new file mode 100644 index 000000000..fe1905e75 --- /dev/null +++ b/tests/pureJava/LocalInterfaceCE.java @@ -0,0 +1,18 @@ + +/** @testcase PR721 interface declaration not permitted in local method scope */ +public class LocalInterfaceCE { + void method() { + interface Local {} // CE 5 interface not allowed here + } + static { + interface Local {} // CE 8 interface not allowed here + } + static void staticMethod() { + interface Local {} // CE 11 interface not allowed here + } + class Inner { + void method() { + interface Local {} // CE 15 interface not allowed here + } + } +} |