tests: one more static initializer
authorBernhard Urban <lewurm@gmail.com>
Tue, 8 May 2012 11:04:08 +0000 (13:04 +0200)
committerBernhard Urban <lewurm@gmail.com>
Tue, 8 May 2012 11:04:08 +0000 (13:04 +0200)
testcase suggested by harald

tests/Static9.java [new file with mode: 0644]

diff --git a/tests/Static9.java b/tests/Static9.java
new file mode 100644 (file)
index 0000000..23f4cf4
--- /dev/null
@@ -0,0 +1,18 @@
+package tests;
+
+public class Static9 {
+       public static Static9 obj;
+       public int t;
+
+       static {
+               Static9.obj = new Static9(0x1337);
+       }
+
+       Static9(int value) {
+               this.t = value;
+       }
+
+       public static void main(String []args) {
+               System.out.printf("0x%08x\n", obj.t);
+       }
+}