Bug 6093 – 'overlapping array copy' with sort of tuple array

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
druntime
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2011-06-02T14:55:00Z
Last change time
2011-06-02T16:26:17Z
Keywords
rejects-valid
Assigned to
nobody
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2011-06-02T14:55:08Z
This D2 program: import std.typecons, std.random, std.algorithm; void main() { alias Tuple!(int) T; T[8] array = [T(0),T(1),T(2),T(3),T(4),T(5),T(6),T(7)]; sort(array[]); randomShuffle(array[]); } Gives me (DMD 2.053): object.Exception@src\rt\arraycat.d(40): overlapping array copy But I think this code is correct.
Comment #1 by kennytm — 2011-06-02T15:40:53Z
*** This issue has been marked as a duplicate of issue 5705 ***
Comment #2 by bearophile_hugs — 2011-06-02T16:26:17Z
(In reply to comment #1) > *** This issue has been marked as a duplicate of issue 5705 *** Thank you.