www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13809] New: dup no longer works with types with postblit and


          Issue ID: 13809
           Summary: dup no longer works with types with postblit and
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: druntime
          Assignee: nobody puremagic.com
          Reporter: thecybershadow gmail.com

///// test.d ////
struct S
    this(this) {}
    ~this() {}

void main()
    S[] arr;

C:\...\object.di(753): Error: pure function
'object._getPostblit!(S)._getPostblit' cannot call impure function
C:\...\object.di(772): Error: template instance object._getPostblit!(S) error
C:\...\object.di(729):        instantiated from here: _doPostblit!(S)
C:\...\object.di(683):        instantiated from here: _dup!(const(S), S)
test.d(10):        instantiated from here: dup!(S)

Introduced in https://github.com/D-Programming-Language/druntime/pull/1031

Dec 02 2014