Add finallyWithoutThrow concept

This commit is contained in:
Andrew Morris
2023-03-23 10:14:34 +11:00
parent ad478c0c4b
commit 56b35e06e2
2 changed files with 20 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
export default function () {
let result: string;
try {
} finally {
result = "Ok";
}
return result;
}

View File

@@ -0,0 +1,10 @@
export @_anon0 {}
@_anon0 = function() {
set_catch :finally0 %_tmp0
unset_catch
finally0:
mov "Ok" %result
throw %_tmp0
mov %result %return
}