-
-
Notifications
You must be signed in to change notification settings - Fork 55
Closed
Labels
Description
Dyon allows you to assign a value to return
, as if it was a normal local variable:
fn foo() -> {
return = 4
return = 5
// will return 5
}
This requires ->
on the function.
The return
value outlives the arguments of the functions, unless they have a lifetime. If you assign to it, the right expression must outlive 'return
.