[Issue 14264] Destructor not called when struct is returned from a parenthesis-less function call
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Mar 9 12:24:52 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14264
--- Comment #4 from Ketmar Dark <ketmar at ketmar.no-ip.org> ---
DMD hackfix is around three lines too (i did that in my branch), but it's a
dirty hack that shouldn't be in the codebase at all. ;-)
actually, there are some other places in DMD where such code is used, but it
seems that this is the only place where bug can be triggered, as the other
cases triggers errors anyway (such as `if (makeFoo)`, for example).
but i'm still not sure if moving `addDtorHook()` to `resolveProperties()` is
the right thing to do. probably not, as `resolveProperties()` seems to be used
for CTFE too, and CTFE doesn't do `addDtorHook()` call.
i dreaming of good guide to compiler internals...
--
More information about the Digitalmars-d-bugs
mailing list