void local(Args...)(Args args)
{
}

void main() @safe
{
    import std.stdio;
    scope int* p;
    local(p);   // Ok
writeln(p); // Error: scope variable p assigned to non-scope parameter _param_0 calling std.stdio.writeln!(int*).writeln
}

The signatures of `std.stdio.writeln` and `local` are the same (see `writeln` [1]). Yet, with '$ dmd -preview=dip1000' the call to `local` compiles, while the call to `writeln` doesn't.

Is that an instance of [2]?

[1] https://github.com/dlang/phobos/blob/v2.092.1/std/stdio.d#L3865
[2] https://issues.dlang.org/show_bug.cgi?id=20023

Reply via email to