[Issue 16960] implicit function return breaks chaining of exceptions

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Dec 15 10:28:43 PST 2016


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

Yuxuan Shui <yshuiv7 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yshuiv7 at gmail.com

--- Comment #4 from Yuxuan Shui <yshuiv7 at gmail.com> ---
(In reply to Mathias LANG from comment #1)
> This is UB, according to
> http://dlang.org/spec/statement.html#ScopeGuardStatement
> 
> > 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.

I don't think it make sense to forbid exiting scope block with a throw. Plus it
totally works barring a few bugs not specific to it.

--


More information about the Digitalmars-d-bugs mailing list