Return Expression
Last updated
Last updated
Evaluates (the result), explicitly returns result from the current or , and transfers control back to the caller.
Any that would go out of scope due to the control transfer are executed after evaluating result, but before returning it to the caller.
It is a semantic error for a ret
expression to appear outside of an fn
declaration or lambda expression. A ret
expression cannot appear in the body of a defer
statement, unless it is nested in a lambda expression.
A ret
expression has no result value.