summaryrefslogtreecommitdiffstats
path: root/tests/pureJava/NonConstants.java
blob: f3d1468f42df6aa470aab8361dad66ecd2849c70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
public class NonConstants {
    private static final int A = 1;
    private static final int B = 2;
    private static final int C = 3;
    private static final int D = 4;
    private static final int E = 5;

    public static void main(String[] args) {
        NonConstants nc = new NonConstants();
        int x = 10;

        switch(x) {
        case (NonConstants).A: break;
        case ((NonConstants)null).B: break;  //ERR
        case (nc).C: break;                  //ERR
        case nc.D: break;                    //ERR
        case ((((NonConstants)))).E: break;
        }
    }
}