[Issue 20768] New: [DIP1014] __move_post_blt must recursively call itself on static arrays whose elements are structs or static arrays that recursively contain structs
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Apr 26 07:23:46 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=20768
Issue ID: 20768
Summary: [DIP1014] __move_post_blt must recursively call itself
on static arrays whose elements are structs or static
arrays that recursively contain structs
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 of current erroneous behavior:
---
void main()
{
static struct A
{
bool movedInto;
void opPostMove(const ref A oldLocation)
{
movedInto = true;
}
}
static struct B
{
A[2] a;
}
B src, dest;
__move_post_blt(dest, src);
foreach (ref a; src.a)
assert(!a.movedInto);
foreach (ref a; dest.a)
assert(a.movedInto); // This currently fails.
}
---
--
More information about the Digitalmars-d-bugs
mailing list