On Friday, October 14, 2016 16:49:44 Nick Sabalausky via Digitalmars-d-learn
wrote:
> This compiles. Is it supposed to?
>
> @safe ubyte[] foo()
> {
> ubyte[512] buf;
> auto slice = buf[0..$];
> // Escaping reference to stack memory, right?
> return slice;
> }
>
> Or is the escaping
On 10/14/16 4:49 PM, Nick Sabalausky wrote:
This compiles. Is it supposed to?
@safe ubyte[] foo()
{
ubyte[512] buf;
auto slice = buf[0..$];
// Escaping reference to stack memory, right?
return slice;
}
Yes, this still is a problem, but Walter has a fix in the works.