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

           Summary: false type deduced with inout append
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Martin Nowak <[email protected]> 2014-04-05 02:14:56 PDT ---
cat > bug.d << CODE
inout(T)[] dup(T)(inout(T)[] a)
{
    inout(T)[] res;
    foreach (ref e; a) // works without ref
        res ~= e;
    return res;
}

struct S
{
    void *p;
}

void foo()
{
    S[] m;
    m = dup(m);
}
CODE

dmd -c bug.d
----
Error: cannot append type inout(const(S)) to type inout(S)[]
----

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

Reply via email to