[Issue 21315] New: TypeInfo_StaticArray.swap is broken
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Oct 15 20:00:55 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=21315
Issue ID: 21315
Summary: TypeInfo_StaticArray.swap is broken
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: druntime
Assignee: nobody at puremagic.com
Reporter: n8sh.secondary at hotmail.com
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]
--
More information about the Digitalmars-d-bugs
mailing list