www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12519] New: Some implicit array casts are missing

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

           Summary: Some implicit array casts are missing
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: verylonglogin.reg gmail.com


--- Comment #0 from Denis Shelomovskij <verylonglogin.reg gmail.com> 2014-04-04
17:37:07 MSK ---
This code should compile:
---
void main()
{
    void[] va;
    byte[] ba;
    byte[1] sba;
    const byte[] cba;
    const byte[1] csba;
    va ~= ba; // ok
    va ~= sba; // ok
    va ~= cba; // Error: cannot append type const(byte[]) to type void[]
    va ~= csba; // Error: cannot append type const(byte[1]) to type void[]
}
---

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