[Issue 20767] New: [DIP1014] __move_post_blt must only recursively call itself on a struct's fields not all members
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Apr 26 07:20:43 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=20767
Issue ID: 20767
Summary: [DIP1014] __move_post_blt must only recursively call
itself on a struct's fields not all members
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 DoNotMove
{
bool movedInto;
void opPostMove(const ref DoNotMove oldLocation)
{
movedInto = true;
}
}
static DoNotMove doNotMove;
struct A
{
@property ref DoNotMove member()
{
return doNotMove;
}
}
A src, dest;
__move_post_blt(dest, src);
assert(!doNotMove.movedInto); // This currently fails.
}
---
--
More information about the Digitalmars-d-bugs
mailing list