Sean Kelly:
> I'd guess that this is a bug, and is related to the extra work the
> compiler does for foreach loops.
This is a reduced and simplified version that shows the same thing:
class Foo {
~this() {
printf("Destroyed\n");
}
}
void main() {
foreach(i; new int[1])
scope Foo f = new Foo();
}
Bye,
bearophile