http://d.puremagic.com/issues/show_bug.cgi?id=8170

           Summary: Incorrect member initialization in associative array
                    of structs
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: juhon...@gmail.com


--- Comment #0 from Juho Nurminen <juhon...@gmail.com> 2012-05-30 13:53:17 PDT 
---
The code below throws an assert error:

void main()
{
    struct S
    {
        void* ptr = null;

        S opAssign(int)
        {
            assert (ptr is null);
            return this;
        }
    }

    S[int] s;
    s[0] = 0;
}

In an associative array, ptr is not initialized to null before opAssign is
called.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to