https://issues.dlang.org/show_bug.cgi?id=16795
Issue ID: 16795
Summary: Allow taking address of 'scope' variable in some cases
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
See https://github.com/dlang/dmd/pull/6253
int* q;
scope int* p;
scope int** pp = &q; // ok
pp = &p; // error
The last line should be allowed, because pp has a smaller lifetime than p.
--
