[Issue 3441] New: Snow Leopard: Static constructors do not work
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Sun Oct 25 22:43:20 PDT 2009
    
    
  
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: nobody at puremagic.com
        ReportedBy: david at icy.com.au
--- Comment #0 from David <david at 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: -------
    
    
More information about the Digitalmars-d-bugs
mailing list