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

          Issue ID: 22977
           Summary: [dip1000] can escape scope pointer returned by nested
                    function
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: [email protected]
          Reporter: [email protected]

Nested function `fn` does not get `return` inferred here:
```
int* gPtr;

void main() @safe
{
    scope int* sPtr;
    int* fn() { return sPtr; }
    gPtr = fn();
}
```

--

Reply via email to