[Issue 16795] New: Allow taking address of 'scope' variable in some cases
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Nov 25 17:43:45 PST 2016
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 at puremagic.com
Reporter: bugzilla at 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.
--
More information about the Digitalmars-d-bugs
mailing list