Thread overview
[Issue 24361] casting string literal to static int array is broken
Jan 30, 2024
Dennis
Jan 30, 2024
Walter Bright
January 30, 2024
https://issues.dlang.org/show_bug.cgi?id=24361

Dennis <dkorpel@live.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://issues.dlang.org/sh
                   |                            |ow_bug.cgi?id=24362

--
January 30, 2024
https://issues.dlang.org/show_bug.cgi?id=24361

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com

--- Comment #1 from Walter Bright <bugzilla@digitalmars.com> ---
Consider:

void test()
{
    const char[8] a = "12345678";
    ulong[1] i = cast(ulong[1])a;   // works
    ulong[1] j = cast(ulong[1])"12345678"; // fails to compile
}

Both should compile. It being a hex string should be irrelevant.

--
December 13
https://issues.dlang.org/show_bug.cgi?id=24361

--- Comment #2 from dlangBugzillaToGithub <robert.schadek@posteo.de> ---
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/20390

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB

--