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

Martin Nowak <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P3
                 CC|                            |[email protected]
            Summary|[scope][dip1000]            |[scope][dip1000]
                   |std.algorithm.move can      |std.algorithm.move escapes
                   |escape references to scope  |scope variable in @safe
                   |classes                     |code

--- Comment #2 from Martin Nowak <[email protected]> ---
cat > bug.d << CODE
import std.algorithm : move;

int* escapeLocal() @safe
{
    int var;
    scope int* p = &var;
    return move(p); // should error
}

void test() @safe
{
    auto p = escapeLocal;
}
CODE
dmd -c -o- -dip1000 bug.d
----

Reduced example not specific to scope classes, seems like move should take it's
argument as return scope, no?

--

Reply via email to