diff options
Diffstat (limited to 'tests/errors/InnerMembers.java')
-rw-r--r-- | tests/errors/InnerMembers.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/errors/InnerMembers.java b/tests/errors/InnerMembers.java new file mode 100644 index 000000000..35bebb8ef --- /dev/null +++ b/tests/errors/InnerMembers.java @@ -0,0 +1,20 @@ +public class InnerMembers { + static class StaticI { + static int x; + static String foo() { return "foo"; } + } + class Inner { + static final int CONST=10; + static final int NOT_CONST=new Integer(10).intValue(); //ERR: non-constant static in inner + static int x; //ERR: non-constant static in inner + static String foo() { return "foo"; }//ERR: non-constant static in inner + interface I {}//ERR: non-constant static in inner + } + public static void m() { + class Inner { + static final int CONST=10; + static int x; //ERR: non-constant static in inner + static String foo() { return "foo"; }//ERR: non-constant static in inner + } + } +} |