[Issue 13720] Adding trivial destructor to std.datetime causes Internal error: ..\ztc\cgelem.c 2418

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Jun 13 14:43:40 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=13720

Maxim Fomin <maxim-fomin at outlook.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |maxim-fomin at outlook.com

--- Comment #1 from Maxim Fomin <maxim-fomin at outlook.com> ---
Reduced

module std.datetime;
import core.time;
import std.exception;

alias DateTimeException = TimeException;

struct SysTime
{

    this(in DateTime dateTime, in FracSec fracSec, immutable UTC tz = null) { }

    /+deprecated+/ unittest
    {
        assertThrown!DateTimeException(SysTime(DateTime.init,
FracSec.from!"hnsecs"(-1), UTC()));
    }

}

struct TimeOfDay
{
    public pure nothrow @safe @nogc ~this() { }

    ubyte _hour;
    ubyte _minute;
    ubyte _second;

}

struct DateTime
{
    TimeOfDay _tod;
}

class UTC 
{
    static immutable(UTC) opCall() @safe pure nothrow
    {
        return _utc;
    }

    static immutable UTC _utc = new immutable(UTC)();
}

--


More information about the Digitalmars-d-bugs mailing list