[Issue 16622] multiple scope(exit) are damaging the stack

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Oct 22 09:34:38 PDT 2016


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

Mathias Lang <mathias.lang at sociomantic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |mathias.lang at sociomantic.co
                   |                            |m
         Resolution|---                         |WONTFIX

--- Comment #3 from Mathias Lang <mathias.lang at sociomantic.com> ---
The specs explicitly mention you shouldn't do that:

> A scope(exit) or scope(success) statement may not exit with a throw, goto, break, continue, or return; nor may it be entered with a goto.

Ref: http://dlang.org/spec/statement.html#ScopeGuardStatement

It might work in some situations though (happen to work on Linux).
If you think it should always work feel free to bring it up on the N.G. or open
an enhancement request with the rationale.

--


More information about the Digitalmars-d-bugs mailing list