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

RazvanN <razvan.nitu1...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |razvan.nitu1...@gmail.com

--- Comment #1 from RazvanN <razvan.nitu1...@gmail.com> ---
The compiler does not do any dataflow analysis so it cannot know whether `str`
is used or not below L1. However, `str` could be used, therefore the compiler
is conservative in this case and errors. In most cases, I think that the error
could actually prevent wrong code.

Anyway, if last use analysis is implemented for move constructors/perfect
fordwarding maybe this will have a chance of being fixed, however, chances are
slim.

--

Reply via email to