[Issue 17246] [REG2.053] Extra destructor call.
https://issues.dlang.org/show_bug.cgi?id=17246 --- Comment #6 from github-bugzi...@puremagic.com --- Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/6eccdeee1d4c41abb0a6e8733e13a85b63765266 fix Issue 17246 - [REG2.053] Extra destructor call. https://github.com/dlang/dmd/commit/614da7260f173ae5dc0ec87e8fa85d3edfb031ce Merge pull request #7238 from WalterBright/fix17246 --
[Issue 17246] [REG2.053] Extra destructor call.
https://issues.dlang.org/show_bug.cgi?id=17246 --- Comment #5 from Steven Schveighoffer--- *** Issue 17897 has been marked as a duplicate of this issue. *** --
[Issue 17246] [REG2.053] Extra destructor call.
https://issues.dlang.org/show_bug.cgi?id=17246 Mike Franklinchanged: What|Removed |Added CC||slavo5...@yahoo.com --- Comment #4 from Mike Franklin --- *** Issue 18050 has been marked as a duplicate of this issue. *** --
[Issue 17246] [REG2.053] Extra destructor call.
https://issues.dlang.org/show_bug.cgi?id=17246 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/6eccdeee1d4c41abb0a6e8733e13a85b63765266 fix Issue 17246 - [REG2.053] Extra destructor call. https://github.com/dlang/dmd/commit/614da7260f173ae5dc0ec87e8fa85d3edfb031ce Merge pull request #7238 from WalterBright/fix17246 fix Issue 17246 - [REG2.053] Extra destructor call. --
[Issue 17246] [REG2.053] Extra destructor call.
https://issues.dlang.org/show_bug.cgi?id=17246 Walter Brightchanged: What|Removed |Added CC||bugzi...@digitalmars.com --- Comment #2 from Walter Bright --- https://github.com/dlang/dmd/pull/7238 --
[Issue 17246] [REG2.053] Extra destructor call.
https://issues.dlang.org/show_bug.cgi?id=17246 Vladimir Panteleevchanged: What|Removed |Added CC||dlang-bugzilla@thecybershad ||ow.net Summary|Extra destructor call. |[REG2.053] Extra destructor ||call. Severity|critical|regression --- Comment #1 from Vladimir Panteleev --- Same example with asserts replacing writelns, and checks based on simple reference counting: struct Foo { int* rc; this(int val) { rc = new int; (*rc) = 1; } this(this) { (*rc)++; } ~this() { if (rc) { assert(*rc > 0); (*rc)--; } } } struct Bar { Foo foo; this(Foo foo, bool) { this.foo = foo; } } bool fun(bool val) { return !val; } auto genBar(bool flag) { return flag ? Bar() : Bar(Foo(10), fun(!flag)); } void main(string[] args) { auto bar = genBar(args.length == 0); } This appears to be a regression, as it worked before 2.052. Introduced in https://github.com/dlang/dmd/commit/e764b3949ae0f95f8fc4d7d2e9114e29fee12493 --