[Issue 20581] DIP1000 wrongly flags hidden ref temporary
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Apr 4 13:02:06 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=20581
--- Comment #4 from moonlightsentinel at disroot.org ---
(In reply to kinke from comment #3)
> This seems to be a 2.091 regression.
That a side effect of https://github.com/dlang/dmd/pull/10550 which made dmd
use ref whenever possible. This avoids behaviour changes due to additional
constructor/destructor calls when -checkaction=context is used.
> Using an explicit non-temporary still works, with an equivalent lifetime of the temporary:
DIP1000 handles variables from different statements just fine but struggles if
multiple temporaries are used within a single statement. Note that this problem
is not tied to -checkaction=context, see e.g.
https://github.com/dlang/dmd/pull/10550#issuecomment-559996626
--
More information about the Digitalmars-d-bugs
mailing list