Issue 24876 - Undocumented cast from slice to static array
Summary: Undocumented cast from slice to static array
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dlang.org (show other issues)
Version: D2
Hardware: x86_64 Linux
: P1 enhancement
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2024-11-24 18:40 UTC by Nick Treleaven
Modified: 2024-11-24 19:04 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Nick Treleaven 2024-11-24 18:40:57 UTC
E.g.:

        void f(int[] b)
        {
            char[4] a;
            a = cast(char[4]) b[0..1]; // OK
            const i = 1;
            a = cast(char[4]) b[i..2]; // OK
        }

PR incoming.
Comment 1 Dlang Bot 2024-11-24 18:43:38 UTC
@ntrel created dlang/dlang.org pull request #3927 "Fix Bugzilla 24876 - Undocumented cast from slice to static array" fixing this issue:

- Fix Bugzilla 24876 - Undocumented cast from slice to static array

https://github.com/dlang/dlang.org/pull/3927
Comment 2 Dlang Bot 2024-11-24 19:04:06 UTC
dlang/dlang.org pull request #3927 "Fix Bugzilla 24876 - Undocumented cast from slice to static array" was merged into master:

- d39f7c837d7c86bf408905d01dc539ccfe24ff1a by Nick Treleaven:
  Fix Bugzilla 24876 - Undocumented cast from slice to static array

https://github.com/dlang/dlang.org/pull/3927