[Dlang-internal] Detect CTFE in AssignExp:semantic

Stefan Koch via Dlang-internal dlang-internal at puremagic.com
Wed Jan 11 15:44:29 PST 2017


On Wednesday, 11 January 2017 at 22:14:18 UTC, Andrei 
Alexandrescu wrote:
> On 1/11/17 8:34 PM, Stefan Koch wrote:
>> On Wednesday, 11 January 2017 at 18:59:29 UTC, Andrei 
>> Alexandrescu wrote:
>>>         foreach (i, ref e; from) to[i] = e;
>> I would guess foreach(i; auto ref e; from) to[i] = e;
>> is a little more compatible.
>
> Why? Aren't operands at this point built-in slices? -- Andrei

it could still be that you are assigning from a const slice.


More information about the Dlang-internal mailing list