Bug 20767 – [DIP1014] __move_post_blt must only recursively call itself on a struct's fields not all members
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-04-26T07:20:43Z
Last change time
2020-05-27T04:46:52Z
Keywords
pull
Assigned to
No Owner
Creator
Nathan S.
Comments
Comment #0 by n8sh.secondary — 2020-04-26T07:20:43Z
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.
}
---
Comment #1 by dlang-bot — 2020-04-26T07:44:50Z
@n8sh created dlang/druntime pull request #3065 "[DIP1014] __move_post_blt: recursively call on fields that are static arrays & do not recursively call on non-field members" fixing this issue:
- Fix Issue 20767 - __move_post_blt must only recursively call itself on a struct's fields not all members [DIP1014]
https://github.com/dlang/druntime/pull/3065
Comment #2 by dlang-bot — 2020-05-27T04:46:52Z
dlang/druntime pull request #3065 "[DIP1014] __move_post_blt: recursively call on fields that are static arrays & do not recursively call on non-field members" was merged into master:
- cc4b3e1b7c1150ce558af59aa9c3d61e77581d59 by Nathan Sashihara:
Fix Issue 20767 - __move_post_blt must only recursively call itself on a struct's fields not all members [DIP1014]
https://github.com/dlang/druntime/pull/3065