[Issue 14696] destructor for temporary called before statement is complete with conditional operator

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Nov 29 00:33:50 UTC 2019


https://issues.dlang.org/show_bug.cgi?id=14696

Dlang Bot <dlang-bot at dlang.rocks> changed:

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

--- Comment #14 from Dlang Bot <dlang-bot at dlang.rocks> ---
dlang/dmd pull request #10628 "Fix issue 14696 - Fix a remaining case where the
destructor is still called on a cold branch" was merged into master:

- 2ec3f1090a11c5b6fe0a9507ba47f7081161ba7f by سليمان السهمي  (Suleyman Sahmi):
  Fix issue 14696 - Fix a remaining case where the destructor is still called
on a cold branch

  Temporary variables should not be destroyed when the branch that initializes
them is not taken.

https://github.com/dlang/dmd/pull/10628

--


More information about the Digitalmars-d-bugs mailing list