From b9cfaab7d6247d2f9b7948a8ac87d6de11c33d0c Mon Sep 17 00:00:00 2001 From: Bernhard Urban Date: Tue, 8 May 2012 13:04:08 +0200 Subject: [PATCH] tests: one more static initializer testcase suggested by harald --- tests/Static9.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/Static9.java diff --git a/tests/Static9.java b/tests/Static9.java new file mode 100644 index 0000000..23f4cf4 --- /dev/null +++ b/tests/Static9.java @@ -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); + } +} -- 2.25.1