With D 2.063, the following code does no longer compile:
import std.datetime;
import std.typecons;
unittest
{
Nullable!SysTime time = SysTime(0);
}
The error message is:
/src/phobos/std/typecons.d(1178): Error: mutable method std.datetime.SysTime.opAssign is not callable using a inout object
Error: template instance std.typecons.Nullable!(SysTime).Nullable.__ctor!() error instantiating
The fix for Issue 10268 doesn't help.
Comment #1 by Jesse.K.Phillips+D — 2013-07-15T13:13:48Z
(In reply to comment #0)
> With D 2.063, the following code does no longer compile:
>
> import std.datetime;
> import std.typecons;
>
> unittest
> {
> Nullable!SysTime time = SysTime(0);
> }
A work around is:
unittest {
Nullable!SysTime time;
time = SysTime(0);
}