https://issues.dlang.org/show_bug.cgi?id=12519

Denis Shelomovskij <[email protected]> changed:

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

--- Comment #2 from Denis Shelomovskij <[email protected]> ---
(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;
}
---

--

Reply via email to