← Back to index
|
Original Bugzilla link
Bug 13809 – dup no longer works with types with postblit and destructors
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-12-02T13:25:00Z
Last change time
2015-02-18T03:38:30Z
Assigned to
nobody
Creator
dlang-bugzilla
Comments
Comment #0
by dlang-bugzilla — 2014-12-02T13:25:03Z
///// 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
Comment #1
by github-bugzilla — 2014-12-03T03:36:06Z
Commits pushed to master at
https://github.com/D-Programming-Language/druntime
https://github.com/D-Programming-Language/druntime/commit/949e7348f14a322c6b7de05d3a249086a51f0995
fix Issue 13809 - dup no longer works with types with postblit and destructors - nested function literal is also assumed to be pure therefor the compiler complains about an impure destructor - move the typeof to a separate _PostBlitType template as we only use it to get the postblit attributes
https://github.com/D-Programming-Language/druntime/commit/b66f2db7efabbaaf7473d4d51ded242db7ce388b
Merge pull request #1054 from MartinNowak/fix13809 fix Issue 13809 - dup no longer works with types with postblit and destructors
Comment #2
by github-bugzilla — 2014-12-03T06:53:50Z
Commits pushed to master at
https://github.com/D-Programming-Language/druntime
https://github.com/D-Programming-Language/druntime/commit/72db25b77d6acf8c6b397311372c6eb4d46cea4a
Add unittest for issue 13809
https://github.com/D-Programming-Language/druntime/commit/72e07b08805ee2928cf2fe16b815040055c16786
Merge pull request #1055 from 9rnsr/fix13809 Add unittest for issue 13809
Comment #3
by github-bugzilla — 2015-02-18T03:38:30Z
Commits pushed to 2.067 at
https://github.com/D-Programming-Language/druntime
https://github.com/D-Programming-Language/druntime/commit/949e7348f14a322c6b7de05d3a249086a51f0995
fix Issue 13809 - dup no longer works with types with postblit and destructors
https://github.com/D-Programming-Language/druntime/commit/b66f2db7efabbaaf7473d4d51ded242db7ce388b
Merge pull request #1054 from MartinNowak/fix13809
https://github.com/D-Programming-Language/druntime/commit/72db25b77d6acf8c6b397311372c6eb4d46cea4a
Add unittest for issue 13809
https://github.com/D-Programming-Language/druntime/commit/72e07b08805ee2928cf2fe16b815040055c16786
Merge pull request #1055 from 9rnsr/fix13809