Bug 21315 – TypeInfo_StaticArray.swap is broken

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-10-15T20:00:55Z
Last change time
2020-10-18T21:20:03Z
Keywords
pull
Assigned to
No Owner
Creator
Nathan S.

Comments

Comment #0 by n8sh.secondary — 2020-10-15T20:00:55Z
Example code: --- void main() { import std.stdio; int[16] a = 1; int[16] b = 2; typeid(int[16]).swap(&a, &b); writeln(a); writeln(b); } --- Expected output: [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2] [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] Actual output: [2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1] [1, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2]
Comment #1 by dlang-bot — 2020-10-15T20:24:21Z
@n8sh created dlang/druntime pull request #3237 "Fix Issue 21315 - TypeInfo_StaticArray.swap is broken" fixing this issue: - Fix Issue 21315 - TypeInfo_StaticArray.swap is broken https://github.com/dlang/druntime/pull/3237
Comment #2 by dlang-bot — 2020-10-16T01:13:46Z
dlang/druntime pull request #3237 "Fix Issue 21315 - TypeInfo_StaticArray.swap is broken" was merged into stable: - d7e58c6e3366b137a3fd8f4ad0548214f3acb8fc by Nathan Sashihara: Fix Issue 21315 - TypeInfo_StaticArray.swap is broken https://github.com/dlang/druntime/pull/3237
Comment #3 by dlang-bot — 2020-10-18T21:20:03Z
dlang/druntime pull request #3228 "merge stable" was merged into master: - bf554d252dab605d8da03455955c1687bcb7db9d by Nathan Sashihara: Fix Issue 21315 - TypeInfo_StaticArray.swap is broken https://github.com/dlang/druntime/pull/3228