Algebraic and implicit conversions

drug drug2004 at bk.ru
Mon Jan 6 19:33:06 UTC 2020


06.01.2020 20:08, Per Nordlöw пишет:
> alias A = Algebraic!(long, string);
>      A x;
>      x = 42;

That's because you try to assign int, not long. This works:

alias A = Algebraic!(long, string);
A x;
x = 42L;


More information about the Digitalmars-d-learn mailing list