Thread overview
[Issue 15315] can break immutable with std.algorithm.move
Apr 24, 2017
ag0aep6g@gmail.com
Dec 17, 2022
Iain Buclaw
Jul 27
Dlang Bot
Jul 28
Dlang Bot
April 24, 2017
https://issues.dlang.org/show_bug.cgi?id=15315

ag0aep6g@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |safe

--
April 24, 2017
https://issues.dlang.org/show_bug.cgi?id=15315

Andrei Alexandrescu <andrei@erdani.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrei@erdani.com

--- Comment #1 from Andrei Alexandrescu <andrei@erdani.com> ---
This should pass regardless of safe. The move function should simply copy the integer without overwriting it. This is because int does not have an elaborate postblit so it is cheap to copy.

--
April 24, 2017
https://issues.dlang.org/show_bug.cgi?id=15315

hsteoh@quickfur.ath.cx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hsteoh@quickfur.ath.cx

--- Comment #2 from hsteoh@quickfur.ath.cx ---
Wait, what? Aren't *both* k1.id and k2.id *immutable*?  How could move(k2,k1) be valid, since it would overwrite k1, which violates the immutability of k1.id?

--
April 25, 2017
https://issues.dlang.org/show_bug.cgi?id=15315

--- Comment #3 from Andrei Alexandrescu <andrei@erdani.com> ---
Indeed, apologies. The target cannot be immutable.

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=15315

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P3

--
July 27
https://issues.dlang.org/show_bug.cgi?id=15315

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #4 from Dlang Bot <dlang-bot@dlang.rocks> ---
@ntrel created dlang/phobos pull request #9032 "Fix Bugzilla 15315 - can break immutable with std.algorithm.move" fixing this issue:

- Fix Bugzilla 15315 - can break immutable with std.algorithm.move

https://github.com/dlang/phobos/pull/9032

--
July 28
https://issues.dlang.org/show_bug.cgi?id=15315

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/phobos pull request #9032 "Fix Bugzilla 15315 - can break immutable with std.algorithm.move" was merged into master:

- dad7820d2aea4937f1ea1edc3340b9a7d454352a by Nick Treleaven:
  Fix Bugzilla 15315 - can break immutable with std.algorithm.move

https://github.com/dlang/phobos/pull/9032

--