[Issue 13775] [REG2.067a] Broken explicit casting of dynamic array slices of known size to static array of different type
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Feb 12 05:31:47 PST 2015
https://issues.dlang.org/show_bug.cgi?id=13775
--- Comment #18 from Kenji Hara <k.hara.pg at gmail.com> ---
(In reply to Martin Nowak from comment #17)
> (In reply to Kenji Hara from comment #16)
> > > See also Issue 13700, which covers the case.
> >
> > Yes, it's an enhancement case.
>
> No, it's an explicit cast and it used to compile in 2.066.1.
>
> cast(ubyte[2])ip[i*2 .. i*2+2])
Read my comment #9. It was *accidentally* accepted in 2.066.1. In git head,
casting T[] to T[n] is generally disallowed (glue layer does not support such
cast operation), and it will be accepted only when the slice bounds are known
at CT. Enhancement 1700 will extend the CT bounds detection, but it's not yet
accepted.
--
More information about the Digitalmars-d-bugs
mailing list