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

John Colvin <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |john.loughran.colvin@gmail.
                   |                            |com
           Hardware|x86_64                      |All
                 OS|Linux                       |All
           Severity|enhancement                 |regression

--- Comment #1 from John Colvin <[email protected]> ---
I suspect this is the same bug, seeing it's the same error in similar
circumstances regressed across the same release.

This worked fine in 2.072.2 and now fails in 2.073:

ref int foo(return ref int s)
{
    return s;
}

int fail()
{
    int s;
    return foo(s); // Error: escaping reference to local variable s
}

int ok()
{
    int s;
    s = foo(s);
    return s;
}


Changed to regression because it's broken correct code.

--

Reply via email to