summaryrefslogtreecommitdiffstats
path: root/tests/pureJava/NonConstants.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pureJava/NonConstants.java')
-rw-r--r--tests/pureJava/NonConstants.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/pureJava/NonConstants.java b/tests/pureJava/NonConstants.java
new file mode 100644
index 000000000..f3d1468f4
--- /dev/null
+++ b/tests/pureJava/NonConstants.java
@@ -0,0 +1,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;
+ }
+ }
+}