anonymous functions and scope(exit)
Luis
Luis.panadero at gmail.com
Sun Jul 4 11:32:22 UTC 2021
On Sunday, 4 July 2021 at 10:07:08 UTC, jfondren wrote:
> On Sunday, 4 July 2021 at 08:24:36 UTC, Luis wrote:
>
> Dennis's explanation makes the most sense:
>
> writeln can throw an Exception, so its presence prevents
> nothrow inference, which otherwise permits the (not intended to
> be catchable) RangeError to exit without properly unwinding the
> stack.
>
> By that, what you're running into is an unpleasant interaction
> between
> 1. scope(exit)s that you're writing
> 2. Errors being thrown rather than Exceptions
> 3. anonymous functions getting inferred as nothrow
>
I did https://issues.dlang.org/show_bug.cgi?id=22099
More information about the Digitalmars-d-learn
mailing list