The lifetime of reduce's internal seed
monarch_dodra via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Apr 23 04:25:08 PDT 2014
On Tuesday, 22 April 2014 at 18:49:41 UTC, Steven Schveighoffer
wrote:
> On Tue, 22 Apr 2014 14:47:19 -0400, monarch_dodra
> <monarchdodra at gmail.com> wrote:
>
>> In this case no, but;
>> //----
>> int[1] foo();
>> int[] a = foo();
>> //----
>> *is* slicing an rvalue, and it *does* compile. I don't think
>> there needs to be escape analysis to catch this.
>
> Oh yeah, that's bad.
>
> -Steve
It's filed:
https://issues.dlang.org/show_bug.cgi?id=12625
I hope it gets fixed. I really see no justification for it.
More information about the Digitalmars-d-learn
mailing list