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: [email protected]
          Reporter: [email protected]

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.
}
---

--

Reply via email to