Error: incompatible types for 'shared(SysTime)' and 'shared(SysTime)'

ketmar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jul 4 22:25:04 PDT 2016


On Monday, 4 July 2016 at 20:54:53 UTC, Luke Picardo wrote:
> if (curTime - lastMsgTime).total!"seconds") ...
>
> Both are shared Durations.
>
> also when I try to do
>
> lastMsgTime = curTime;
>
> Gives me
>
> Error: non-shared method std.datetime.SysTime.opAssign is not 
> callable using a shared object.

cast `shared` away. yes, this is how you supposed to use it now: 
cast it away.


More information about the Digitalmars-d-learn mailing list