Can't recreate a range?

Casey noman at email.com
Thu Apr 30 13:07:50 UTC 2020


On Wednesday, 29 April 2020 at 22:32:00 UTC, Simen Kjærås wrote:
> I mean, it might be you messed up in posting this, but having 
> an empty popFront and expecting it to do something is a tad 
> optimistic.

I was just trying to get the example to a very minimal state.  I 
just added more descriptive code that replicates the bug.

>
> What's the value of count when the code asserts?

The count ends up being the count of the previous test + the 
count of the current test.  In the code I uploaded, the first 
test will get 1, but the second test will get 2.  I'm printing 
out the output of the range to force it to actually perform the 
loop, so you can see that the contents of the first file are 
printed twice.


More information about the Digitalmars-d-learn mailing list