[Issue 20880] [DIP1000] Temporaries escape innards absent destructor

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue May 25 18:13:08 UTC 2021


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

Paul Backus <snarwin+bugzilla at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |snarwin+bugzilla at gmail.com
         Resolution|---                         |WORKSFORME

--- Comment #1 from Paul Backus <snarwin+bugzilla at gmail.com> ---
As of DMD 2.096.1, both unittests fail to compile, with the following error
messages:

---
bug.d(18): Error: returning `temporary.get()` escapes a reference to local
variable `temporary`
bug.d(24): Error: address of struct literal `S(null)` assigned to longer lived
variable `outlive`
---

--


More information about the Digitalmars-d-bugs mailing list