stage3: unify to cleanup; MIR return-defer; docs+smokes updated; LLVM(harness): finalize_phis ownership, ret.py simplified, uses-predeclare; cleanup return override green; method-postfix cleanup return WIP (PHI head)
This commit is contained in:
12
apps/tests/method_postfix_finally_only.nyash
Normal file
12
apps/tests/method_postfix_finally_only.nyash
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