[Issue 13809] New: dup no longer works with types with postblit and destructors
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Dec 2 05:25:03 PST 2014
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 at puremagic.com
Reporter: thecybershadow at 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
--
More information about the Digitalmars-d-bugs
mailing list