On Monday, 29 June 2020 at 22:47:16 UTC, Steven Schveighoffer wrote:
Yes. The return statement is inside the scope of the function, so it runs before the scope is exited. Are you saying the spec doesn't say that?

Thanks for the assurance. The spec does state it like this:
```
The ScopeGuardStatement executes NonEmptyOrScopeBlockStatement at the close of the current scope, rather than at the point where the ScopeGuardStatement appears.
```
Which is correct, but there is no single example with a return where the ScopeBlockStatement interferes with the return.

I started wondering about this since I hit a bug in a piece of code.

Reply via email to