Thread overview
[Issue 12519] Some implicit array casts are missing
May 26, 2014
Kenji Hara
May 26, 2014
Denis Shelomovskij
Dec 17, 2022
Iain Buclaw
May 26, 2014
https://issues.dlang.org/show_bug.cgi?id=12519

Kenji Hara <k.hara.pg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> ---
void[] is an array of untyped *mutable* data. So appending const data to mutable array will violate type system.

--
May 26, 2014
https://issues.dlang.org/show_bug.cgi?id=12519

Denis Shelomovskij <verylonglogin.reg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |---

--- Comment #2 from Denis Shelomovskij <verylonglogin.reg@gmail.com> ---
(In reply to Kenji Hara from comment #1)
> void[] is an array of untyped *mutable* data. So appending const data to mutable array will violate type system.

But `byte` has no indirections so `const byte` is convertible to `byte` and this logically equivalent code is valid:
---
void main()
{
    void[] va;
    const byte[] cba;
    const byte[1] csba;
    byte[] tmp;
    tmp ~= cba;
    tmp ~= csba;
    va = tmp;
}
---

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=12519

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P3

--