Can't instantiate SimpleTimeZone

Andrej Mitrovic andrej.mitrovich at gmail.com
Thu May 16 07:00:58 PDT 2013


I was using the AE[1] library, but recently it started to fail to
compile due to essentially this:

--------
import std.datetime;

void main()
{
    Duration dur;
    auto x = new SimpleTimeZone(dur);
}
--------

> test.d(8): Error: immutable method std.datetime.SimpleTimeZone.this is not callable using a mutable object
> test.d(8): Error: no constructor for SimpleTimeZone

The only constructors available for that class are all immutable.

Why the breaking change? Did it break on purpose? And why is the error
message so awful?


More information about the Digitalmars-d-learn mailing list