Summary: singletons in std.datetime are not created early
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos

--- Comment #0 from Jose Garcia <> 2011-06-05 22:24:28 PDT ---
When accessing the singletons from a shared static this module ctr, the
singleton have not been instantiated. The following code succeeds when it

import std.datetime;

shared static this()
  assert(UTC() is null);
  assert(LocalTime() is null);

A possible solution is:

class Test
   shared static this() { _obj = new immutable(shared(Object)); }
   shared static immutable Object _ojb;

shared static this()
   assert(Test._ojb !is null);

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

Reply via email to