https://issues.dlang.org/show_bug.cgi?id=20901

--- Comment #2 from Bolpat <[email protected]> ---
I reduced that issue from a much larger code and was happy to push it under 50
lines of code.

Basically, what would have to happen is this:

// At compile-time:
S tmp;
enum value1 = tmp.front.deepcopy; // Note: enum
tmp.popFront();
enum value2 = tmp.front.deppcopy; // Note: enum
tmp.popFront();

// Happens at run-time:
writeln(value1);
writeln(value2);

I cannot imagine a situation where someone relying on a non-deep copy would not
accept that this is not how static foreach works. Everything that is not a deep
copy is plainly wrong.

--

Reply via email to