[Issue 19774] wrong code caused by opIndex

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Apr 8 21:57:09 UTC 2019


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

johanengelen at weka.io changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |johanengelen at weka.io

--- Comment #7 from johanengelen at weka.io ---
fyi with LDC: the bug is that `return bar()[1];` first calls the destructor on
the temporary returned by `bar()`, and _after_ that calls opIndex. Clearly the
order of those calls should be reversed.

--


More information about the Digitalmars-d-bugs mailing list