Summary: static this() inside struct skipped upon static method
           Product: D
           Version: unspecified
          Platform: Other
        OS/Version: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Andrei Alexandrescu <> 2011-09-30 
09:40:03 PDT ---
A good example is given by core.time itself. Consider.

import core.time;

static this() {
    auto t = TickDuration.from!"msecs"(100);

void main(){}

This code aborts with a division by zero error. Apparently the call to the
static method TickDuration.from is allowed without the @trusted shared static
this() being called.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to