GNOME Bugzilla – Bug 565852
class init not called until first instantiation
Last modified: 2009-01-09 23:26:05 UTC
public class Test { public static Test t = new Test (); public static void main () { stdout.printf ("t is%s null\n", t==null ? "" : " not"); var m = new Test (); stdout.printf ("t is%s null\n", t==null ? "" : " not"); } } output: t is null t is not null solution: the TYPE_TEST macro should be called before accessing a static ref. field. Works fine if t is a value type like int.
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. *** This bug has been marked as a duplicate of 543189 ***