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

           Summary: Can't implicitly cast static arrays of primitives to
                    immutable
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: dsim...@yahoo.com


--- Comment #0 from David Simcha <dsim...@yahoo.com> 2010-07-13 12:09:39 PDT ---
Now that static arrays are value types, this should be legal because there's no
mutable indirection:

void main() {
    immutable uint[2] foo = getArray();
}

uint[2] getArray() {
    uint[2] ret;
    return ret;
}


It doesn't work on 2.047.  Instead I get:

Error: cannot implicitly convert expression (getArray()) of type uint[2u] to
const(immutable(uint)[])

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

Reply via email to