[Issue 13700] Rejected valid conversion from slice to fixed size array
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Dec 10 01:00:15 PST 2014
https://issues.dlang.org/show_bug.cgi?id=13700
--- Comment #2 from Kenji Hara <k.hara.pg at gmail.com> ---
(In reply to Kenji Hara from comment #1)
> https://github.com/D-Programming-Language/dmd/pull/4209
Handle following slice forms:
arr[e1-b .. e2] (length = a)
arr[e1 .. e2+b] (length = b)
arr[e1-a .. e2+b] (length = a + b)
arr[e1+a .. e2+b] (length = b - a, if a <= b)
arr[e1-a .. e2-b] (length = a - b, if a >= b)
Requires:
1. 'e1' and 'e2' are equivalent expression that have no side effects.
2. 'a' and 'b' are (const-folded) constants.
--
More information about the Digitalmars-d-bugs
mailing list