[Issue 11672] New: default initialization of static array of structs with a single value fails

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Dec 3 14:48:44 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=11672

           Summary: default initialization of static array of structs with
                    a single value fails
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: nilsbossung at googlemail.com


--- Comment #0 from Nils <nilsbossung at googlemail.com> 2013-12-03 14:48:35 PST ---
---
cat > test.d << code
struct V {float f;}
struct S
{
    V[3] v = V(1);
}
void main()
{
    S s;
    assert(s.v == [V(1), V(1), V(1)]); /* fails, is [V(42), V(nan), V(nan)] */
}
code
rdmd test.d
---
core.exception.AssertError at test(9): Assertion failure
---

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


More information about the Digitalmars-d-bugs mailing list