digitalmars.D.bugs - [Issue 16795] New: Allow taking address of 'scope' variable in some
- via Digitalmars-d-bugs (20/20) Nov 25 2016 https://issues.dlang.org/show_bug.cgi?id=16795
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: nobody puremagic.com Reporter: bugzilla digitalmars.com 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. --
Nov 25 2016