errdefer and try/defer fix

This commit is contained in:
2026-07-13 19:20:22 +02:00
parent 9e75549d02
commit 6de4d9f9f3
23 changed files with 113190 additions and 105482 deletions
+4 -1
View File
@@ -136,10 +136,13 @@ Expr :: struct {
span: source.Span,
type: types.Type,
integer: i64,
// Aggregate/call children normally; Try stores errdefer capture local IDs
// encoded as Expr_Id because it otherwise has no args.
args: []Expr_Id,
// `Catch` block handlers use `body` for the handler statements and `target`
// for the optional captured error local. A missing `right` means the handler
// exits on every path and therefore has no fallback value.
// exits on every path and therefore has no fallback value. `Try` uses `body`
// for active error-exit cleanup.
body: []Stmt_Id,
target: Ref,
left: Expr_Id,