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.
@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
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