phase: 20.49 COMPLETE; 20.50 Flow+String minimal reps; 20.51 selfhost v0/v1 minimal (Option A/B); hv1-inline binop/unop/copy; docs + run_all + CURRENT_TASK -> 21.0
This commit is contained in:
12
apps/tests/method_postfix_finally_only.hako
Normal file
12
apps/tests/method_postfix_finally_only.hako
Normal file
@ -0,0 +1,12 @@
|
||||
static box Main {
|
||||
main(args) {
|
||||
// try body: compute a value
|
||||
local x = 41
|
||||
// no return here; finally will return
|
||||
}
|
||||
cleanup {
|
||||
// finally runs and returns x+1
|
||||
x = x + 1
|
||||
return x
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user