[Issue 8486] Possibly wrong interaction of Variant and const arrays

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Oct 18 12:12:52 UTC 2019


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

berni44 <bugzilla at d-ecke.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla at d-ecke.de

--- Comment #6 from berni44 <bugzilla at d-ecke.de> ---
This seems not to be a Phobos bug:

import std.stdio;

void main()
{
    const int[] arr;
    writeln(typeof(arr).stringof);
    Test(arr);
}

struct Test
{
    this(T)(T value)
    {
        writeln(T.stringof);
    }
}

writes:

const(int[])
const(int)[]

For me the question remains: Is this intentional (for reasons I don't
understand yet) or a language bug?

--


More information about the Digitalmars-d-bugs mailing list