diff options
| author | Curtis Wilkinson <curtistatewilkinson@gmail.com> | 2022-03-02 17:51:46 +1000 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-03-02 14:46:09 -0500 |
| commit | 7fc8dd66427dd0abed5ca9195e6afdbb687bd5f5 (patch) | |
| tree | e025b298b28a20c70c4e4ab766b11a1c8c881b95 /src/AstGen.zig | |
| parent | 5c8a507e7a8e2e58a0ca855689bcd2edd2ab6ab8 (diff) | |
| download | zig-7fc8dd66427dd0abed5ca9195e6afdbb687bd5f5.tar.gz zig-7fc8dd66427dd0abed5ca9195e6afdbb687bd5f5.zip | |
Zir: rename the 'ret_coerce' tag to 'ret_tok' as per TODO
Diffstat (limited to 'src/AstGen.zig')
| -rw-r--r-- | src/AstGen.zig | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/AstGen.zig b/src/AstGen.zig index e7e7af3354..2fee02751c 100644 --- a/src/AstGen.zig +++ b/src/AstGen.zig @@ -2303,7 +2303,7 @@ fn unusedResultExpr(gz: *GenZir, scope: *Scope, statement: Ast.Node.Index) Inner .compile_error, .ret_node, .ret_load, - .ret_coerce, + .ret_tok, .ret_err_value, .@"unreachable", .repeat, @@ -3420,8 +3420,8 @@ fn fnDecl( if (!fn_gz.endsWithNoReturn()) { // Since we are adding the return instruction here, we must handle the coercion. - // We do this by using the `ret_coerce` instruction. - _ = try fn_gz.addUnTok(.ret_coerce, .void_value, tree.lastToken(body_node)); + // We do this by using the `ret_tok` instruction. + _ = try fn_gz.addUnTok(.ret_tok, .void_value, tree.lastToken(body_node)); } break :func try decl_gz.addFunc(.{ @@ -3850,8 +3850,8 @@ fn testDecl( const block_result = try expr(&fn_block, &fn_block.base, .none, body_node); if (fn_block.isEmpty() or !fn_block.refIsNoReturn(block_result)) { // Since we are adding the return instruction here, we must handle the coercion. - // We do this by using the `ret_coerce` instruction. - _ = try fn_block.addUnTok(.ret_coerce, .void_value, tree.lastToken(body_node)); + // We do this by using the `ret_tok` instruction. + _ = try fn_block.addUnTok(.ret_tok, .void_value, tree.lastToken(body_node)); } const func_inst = try decl_block.addFunc(.{ |
