scope() statements and return

Ali Çehreli via Digitalmars-d digitalmars-d at puremagic.com
Thu Oct 2 20:23:24 PDT 2014


On 10/02/2014 07:17 PM, Shammah Chancellor wrote:
> Per the documentation (http://dlang.org/statement.html) scope statements
> are not precluded from returning, but DMD does not allow for it.
> Should the documentation be updated?
>
> -S
>

Can you show a piece of code. The following quote says "may not exit 
with [...] return":

"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."

Ali



More information about the Digitalmars-d mailing list