diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-06-02 18:48:32 -0700 |
|---|---|---|
| committer | Jakub Konka <kubkon@jakubkonka.com> | 2022-06-05 10:37:08 +0200 |
| commit | ef885a78d606693c73641159731274cc57f6ea98 (patch) | |
| tree | 6c962ecd3098f25ca6e5da87cd018fb90c6f1520 /src/AstGen.zig | |
| parent | 0224ad19b82bb307a2c246f2e30826af599aa895 (diff) | |
| download | zig-ef885a78d606693c73641159731274cc57f6ea98.tar.gz zig-ef885a78d606693c73641159731274cc57f6ea98.zip | |
stage2: implement the new "try" ZIR/AIR instruction
Implements semantic analysis for the new try/try_inline ZIR
instruction. Adds the new try/try_ptr AIR instructions and implements
them for the LLVM backend.
Fixes not calling rvalue() for tryExpr in AstGen.
This is part of an effort to implement #11772.
Diffstat (limited to 'src/AstGen.zig')
| -rw-r--r-- | src/AstGen.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/AstGen.zig b/src/AstGen.zig index 86ac6633ba..7874ed8218 100644 --- a/src/AstGen.zig +++ b/src/AstGen.zig @@ -4896,7 +4896,8 @@ fn tryExpr( _ = try else_scope.addUnNode(.ret_node, err_code, node); try else_scope.setTryBody(try_inst, operand); - return indexToRef(try_inst); + const result = indexToRef(try_inst); + return rvalue(parent_gz, rl, result, node); } fn orelseCatchExpr( |
