digitalmars.D.bugs - [Issue 13809] New: dup no longer works with types with postblit and
- via Digitalmars-d-bugs (36/36) Dec 02 2014 https://issues.dlang.org/show_bug.cgi?id=13809
https://issues.dlang.org/show_bug.cgi?id=13809 Issue ID: 13809 Summary: dup no longer works with types with postblit and destructors 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; arr.dup; } ///////////////// C:\...\object.di(753): Error: pure function 'object._getPostblit!(S)._getPostblit' cannot call impure function 'test.S.~this' C:\...\object.di(772): Error: template instance object._getPostblit!(S) error instantiating 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