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

           Summary: [CTFE] assignment to reference in foreach fails
                    without error message
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: CTFE
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: an...@gmx.net


--- Comment #0 from aneas <an...@gmx.net> 2012-03-07 02:13:42 PST ---
string foo() {
    string[] children = ["0"];
    foreach(ref child; children)
        child = "1";
    return children[0];
}

void main() {
    static assert(foo() == "0");
    assert(foo() == "1");
}

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

Reply via email to