Compare commits

..

1 Commits

Author SHA1 Message Date
9bc514a782 implicit function-level try blocks 2025-10-29 14:51:50 -07:00

View File

@ -278,13 +278,12 @@ export class Compiler {
return bodyInstructions
}
// If function has catch or finally, wrap body in try/catch/finally
if (catchVariable || finallyBody) {
// If function has catch or finally, wrap body in try/catch/finally
instructions.push(
...this.#compileTryCatchFinally(compileFunctionBody, catchVariable, catchBody, finallyBody, input)
)
} else {
// Normal function without catch/finally
instructions.push(...compileFunctionBody())
}