Thread overview
[Issue 17505] [REG2.075] @safe constructor requires the deconstructor to be safe as well
Jun 17, 2017
Martin Nowak
Jun 17, 2017
greenify
Jun 17, 2017
Martin Nowak
June 17, 2017
https://issues.dlang.org/show_bug.cgi?id=17505

Martin Nowak <code@dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P3
                 CC|                            |code@dawg.eu

--- Comment #1 from Martin Nowak <code@dawg.eu> ---
Introduced by https://github.com/dlang/dmd/pull/6816

Also manifestates in libasync https://github.com/etcimon/libasync/blob/a56cf33720731de717ef5d6c5f1c0d51341da145/source/libasync/events.d#L57.

----
source/libasync/events.d(57,2): Error: destructor
'libasync.events.EventLoop.~this' is not nothrow
source/libasync/events.d(57,2): Error: nothrow constructor
'libasync.events.EventLoop.this' may throw
----

--
June 17, 2017
https://issues.dlang.org/show_bug.cgi?id=17505

greenify <greeenify@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |greeenify@gmail.com

--- Comment #2 from greenify <greeenify@gmail.com> ---
FYI have you seen Cybershadow's comment? https://github.com/dlang/dmd/pull/6816#issuecomment-307657520

And his reduced test case for the regression in libasync?

struct S
{
    ~this() {}
}

class C
{
    S s;

    this() nothrow {}
}

--
June 17, 2017
https://issues.dlang.org/show_bug.cgi?id=17505

--- Comment #3 from Martin Nowak <code@dawg.eu> ---
(In reply to greenify from comment #2)
> FYI have you seen Cybershadow's comment? https://github.com/dlang/dmd/pull/6816#issuecomment-307657520

Ah thanks, libasync is a duplicate of issue 17494, does have the nothrow, not the `@safe` issue.

--
June 17, 2017
https://issues.dlang.org/show_bug.cgi?id=17505

--- Comment #4 from github-bugzilla@puremagic.com ---
Commit pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/558773e64d42d56ad02970adfdc1371311ca3291 add test cases for existing production code

- fixes Issues 17494, 17505, 17506

--
June 17, 2017
https://issues.dlang.org/show_bug.cgi?id=17505

github-bugzilla@puremagic.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--
August 07, 2017
https://issues.dlang.org/show_bug.cgi?id=17505

--- Comment #5 from github-bugzilla@puremagic.com ---
Commit pushed to newCTFE at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/558773e64d42d56ad02970adfdc1371311ca3291 add test cases for existing production code

--