On 11/09/2013 12:35 AM, lomereiter wrote:
Indeed, disassembly reveals an allocation (with all three compilers => it's the front-end which generates this crap).
ouch.
I guess the compiler incorrectly treats { node.value; } as a delegate
and copies the node to GC heap.
void foo() {
int* node = null;
enum mutable = __traits(compiles, {node.value ;});
}
void main() {
foo();
}
oh, I see, it's the delegate doing that. that's helpful. https://d.puremagic.com/issues/show_bug.cgi?id=11483
