[Issue 21880] New: [REG 2.095] scope variable assigned to non-scope parameter calling function

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Apr 30 00:13:21 UTC 2021


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

          Issue ID: 21880
           Summary: [REG 2.095] scope variable assigned to non-scope
                    parameter calling function
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: ibuclaw at gdcproject.org

Reduced test compiled with: -preview=dip1000

Works if `extern(D)' or `extern(C)'.
---
extern(C++):
void spawnProcess(scope const(char*)*, File = File()) @safe
{
}

void pipeProcess(scope const(char*)* args) @safe
{
    pipeProcessImpl!spawnProcess(args);
}

void pipeProcessImpl(alias spawnFunc, Cmd)(Cmd command) @trusted 
{
    spawnFunc(command);
}

struct File
{
    ~this() @safe
    {
    }
}
---

Caused by https://github.com/dlang/dmd/pull/12162

--


More information about the Digitalmars-d-bugs mailing list