Bug 15641 – [REG2.067] std.typecons.Proxy doesn't work when destructor is not nothrow

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
All
Creation time
2016-02-03T12:26:32Z
Last change time
2019-01-21T13:07:46Z
Assigned to
No Owner
Creator
Saurabh Das

Comments

Comment #0 by saurabh.das — 2016-02-03T12:26:32Z
This code: struct A { import std.stdio; File f; } struct B { A a; import std.typecons; mixin Proxy!a; } rdmd proxytest.d: /Library/D/dmd/src/phobos/std/typecons.d(5055): Error: 'proxytest.A.~this' is not nothrow /Library/D/dmd/src/phobos/std/typecons.d(5050): Error: function 'proxytest.B.Proxy!(a).toHash' is nothrow yet may throw Failed: ["dmd", "-v", "-o-", "proxytest.d", "-I."] Marc Schütz investigated and found: It used to work in 2.066.1; bisecting points to this PR: https://github.com/D-Programming-Language/phobos/pull/3043 When bisecting between 2.066 and 2.067, there are other candidates: https://github.com/D-Programming-Language/phobos/pull/3042 https://github.com/D-Programming-Language/dmd/pull/4459 https://github.com/D-Programming-Language/druntime/pull/1188 Unlikely: https://github.com/D-Programming-Language/phobos/pull/3001 https://github.com/D-Programming-Language/phobos/pull/3043 https://github.com/D-Programming-Language/dmd/pull/4452 https://github.com/D-Programming-Language/dmd/pull/4463 Discussion on the forum: http://forum.dlang.org/post/[email protected]
Comment #1 by edi33416 — 2018-12-17T15:23:42Z
Not reproducible with current master. Probably fixed by this PR - https://github.com/dlang/phobos/pull/6699