[Issue 6186] Struct destructor is not called on out parameter
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Oct 2 11:27:22 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=6186
hsteoh at quickfur.ath.cx changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hsteoh at quickfur.ath.cx
--- Comment #5 from hsteoh at quickfur.ath.cx 2013-10-02 11:27:20 PDT ---
Wow. This is a nasty one. I agree that out parameters should be destructed if
they're already initialized.
Isn't it good enough for the compiler to just issue the equivalent of `x =
typeof(x).init` at the beginning of the function when x is an out parameter?
AFAIK, if you were to actually write this out in code it'd call the dtor before
making the assignment (right?). At least, that's what I *thought* the compiler
did based on what TDPL describes.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list