aboutsummaryrefslogtreecommitdiffstats
path: root/tests/errors/InnerMembers.java
blob: 35bebb8ef6ef82d276456a5117f3cdef9cf9c96f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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
        }
    }
}