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: nob...@puremagic.com
          Reporter: bugzi...@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.

--

Reply via email to