http://d.puremagic.com/issues/show_bug.cgi?id=3441

           Summary: Snow Leopard: Static constructors do not work
           Product: D
           Version: 1.050
          Platform: All
        OS/Version: Mac OS X
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: da...@icy.com.au


--- Comment #0 from David <da...@icy.com.au> 2009-10-25 22:43:19 PDT ---
import std.stdio;

class Foo {
    static int foo = 42;
    static this() {
        writefln("static constructor");
        foo = 128;
    }
}

int main() {
    writefln("main: %s", Foo.foo);
    return 0;
}

will print
"main: 42"

Static constructor never called.

(Same code works as expected on normal Leopard, this has only been seen on Snow
Leopard)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to