Bug 10025 – Implicit conversion for bigint array append

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-05-03T16:43:51Z
Last change time
2024-12-13T18:06:45Z
Keywords
rejects-valid
Assigned to
No Owner
Creator
bearophile_hugs
Moved to GitHub: dmd#18577 →

Comments

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
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18577 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB