diff --git a/concept-code/exceptions/finallyWithoutThrow.ts b/concept-code/exceptions/finallyWithoutThrow.ts new file mode 100644 index 0000000..53686c1 --- /dev/null +++ b/concept-code/exceptions/finallyWithoutThrow.ts @@ -0,0 +1,10 @@ +export default function () { + let result: string; + + try { + } finally { + result = "Ok"; + } + + return result; +} diff --git a/concept-code/exceptions/finallyWithoutThrow.vsm b/concept-code/exceptions/finallyWithoutThrow.vsm new file mode 100644 index 0000000..aad157a --- /dev/null +++ b/concept-code/exceptions/finallyWithoutThrow.vsm @@ -0,0 +1,10 @@ +export @_anon0 {} + +@_anon0 = function() { + set_catch :finally0 %_tmp0 + unset_catch +finally0: + mov "Ok" %result + throw %_tmp0 + mov %result %return +}