https://issues.dlang.org/show_bug.cgi?id=15191

--- Comment #1 from Walter Bright <bugzi...@digitalmars.com> ---
Reformatting for readability:

enum N=100;

ref int[N] foo(return ref int[N] s)@safe
{
    return s;
}

int[N]* bar(return ref int[N] s) @safe
{
    return &foo(s);
}

ref int[N] baz()@safe
{
    int[N] s;
    return *bar(s);
}

void bang(ref int[N] x) @safe
{
    x[]=0x25BAD;
}

void main() @safe
{
    bang(baz());
}

--

Reply via email to