www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20768] New: [DIP1014] __move_post_blt must recursively call


          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 puremagic.com
          Reporter: n8sh.secondary 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)
    foreach (ref a; dest.a)
        assert(a.movedInto); // This currently fails.

Apr 26 2020