D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 20049 - object.destroy doesn't propagate attributes
Summary: object.destroy doesn't propagate attributes
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: druntime (show other issues)
Version: D2
Hardware: All All
: P1 major
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-14 04:33 UTC by Илья Ярошенко
Modified: 2019-07-14 16:49 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Илья Ярошенко 2019-07-14 04:33:34 UTC
https://run.dlang.io/is/OHlf2c

import std.stdio;

static interface I { ref double bar() @safe pure nothrow @nogc; }
static abstract class D { int index; }
static class C : D, I
{
    double value;
    ref double bar() @safe pure nothrow @nogc { return value; }
    this(double d) { value = d; }
    ~this() nothrow {}
}

void main() nothrow
{
    auto c = new C(1);
    destroy(c);
}
Comment 1 Dlang Bot 2019-07-14 07:28:49 UTC
@ShigekiKarita updated dlang/druntime pull request #2674 "Fix issue 20049 - object.destroy doesn't propagate attributes " mentioning this issue:

- add minimal regression test for Issue 20049

https://github.com/dlang/druntime/pull/2674
Comment 2 Dlang Bot 2019-07-14 12:28:52 UTC
dlang/druntime pull request #2674 "Fix issue 20049 - object.destroy doesn't propagate attributes " was merged into stable:

- 7864d22dca1d0323587d3320f7e0b1f9f294ba6f by karita:
  add minimal regression test for Issue 20049

https://github.com/dlang/druntime/pull/2674