www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19388] New: [dip1000] scope return parameters should be


          Issue ID: 19388
           Summary: [dip1000] scope return parameters should be safely
                    assigned in scope constructor
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: ilyayaroshenko gmail.com

struct C
    void* u;
    this(scope return void* v)  safe scope
        this.u = v;

<source>(6): Error: scope variable `v` assigned to `this` with longer lifetime

Compiler returned: 1

This DIP just ignores constructors. This cause a lot of issues during libraries

Nov 10 2018