The given code reports 0 inserted elements and the final array is [false], so this is clearly wrong and should be covered.
---
import std;
void main()
{
Array!bool atum;
writeln(atum.insertBack([false]));
writeln(atum[]);
}
Comment #1 by contact — 2021-01-18T01:29:28Z
I'm already working on a fix.
Comment #2 by dlang-bot — 2021-01-18T20:55:37Z
@ljmf00 updated dlang/phobos pull request #7750 "Fix issue 21555, 21556 - container: array: insertAfter and insertBack are wrong" fixing this issue:
- Fix issue 21555: std.container.array: insertBack is wrong and should be tested for Array!bool
insertBack() returns 0 inserted elements everytime due to a preformed
.popFront() on the range.
Signed-off-by: Luís Ferreira <[email protected]>
- Fix issues 21555, 21556: container: array: add missing tests for Array!T .insertBack and .insertAfter
Signed-off-by: Luís Ferreira <[email protected]>
https://github.com/dlang/phobos/pull/7750
Comment #3 by dlang-bot — 2021-01-19T01:20:16Z
dlang/phobos pull request #7750 "Fix issue 21555, 21556 - container: array: insertAfter and insertBack are wrong" was merged into master:
- 93ebaa729116a813ebb2a8d175abe4400ec00ecf by Luís Ferreira:
Fix issue 21555: std.container.array: insertBack is wrong and should be tested for Array!bool
insertBack() returns 0 inserted elements everytime due to a preformed
.popFront() on the range.
Signed-off-by: Luís Ferreira <[email protected]>
- 30f71fd5705beaa3dc9c5131b081c60ccaa0974c by Luís Ferreira:
Fix issues 21555, 21556: container: array: add missing tests for Array!T .insertBack and .insertAfter
Signed-off-by: Luís Ferreira <[email protected]>
https://github.com/dlang/phobos/pull/7750