how is this array subtyping inside struct (bug?) possible?

Kagamin spam at here.lot
Mon Aug 10 15:36:35 UTC 2020


On Monday, 10 August 2020 at 13:44:17 UTC, Avrina wrote:
> This really doesn't excuse why this bug is happening. Why is 
> writeln() using front() and popFront() that modifies the range 
> rather than simply using foreach()? Why is it modifying 
> something it knows to be a class? This is definitely a bug that 
> should be fixed. Not sure why people are trying to explain it 
> away, looking that the writeln implementation it is completely 
> convoluted. It's no wonder bugs like this are going to happen.

When writeln receives a reference type range, are you sure it 
shouldn't be consumed? How do you decide that?


More information about the Digitalmars-d mailing list