https://issues.dlang.org/show_bug.cgi?id=19823
Jonathan M Davis <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] | |m --- Comment #3 from Jonathan M Davis <[email protected]> --- dropOne isn't actually the problem at all. Rather, it looks like the problem is with either `Filter`'s `popFront` or with the code that dmd is generating. This reduced test case has the same problem: void main() { import std.algorithm.comparison : equal; import std.algorithm.iteration : filter; auto arr = [1, 2, 3, 4]; auto result = arr.filter!(a => a != 1)(); assert(result.save.equal([2, 3, 4])); result.popFront(); assert(result.equal([3, 4])); } For some reason, `popFront` is not doing anything with this particular example, and the second assertion fails. Rather if the result is printed after `popFront`, it's equivalent to [2, 3, 4], and changing the second assertion to assert(result.equal([2, 3, 4])); makes it pass. So, clearly, `popFront` is doing nothing for some reason. --
