Comment #0 by bearophile_hugs — 2013-05-03T16:43:51Z
import std.bigint: BigInt;
void main() {
auto p = new BigInt[1];
p[0] = BigInt(1); // OK
p[0] = 1; // OK
p ~= BigInt(1); // OK
p ~= 1; // Error
}
DMD 2.063beta:
test.d(7): Error: cannot append type int to type BigInt[]
Comment #1 by yebblies — 2013-08-02T21:27:07Z
> p[0] = 1; // OK
This is assignment, so it works.
> p ~= 1; // Error
This would be implicit construction of a BigInt from an int.
That makes this an enhancement request for implicit construction on append.
Comment #2 by robert.schadek — 2024-12-13T18:06:45Z