zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit cf62f02ba99e45061f073f764d7d5a137ac35a67 (tree)
parent 23feafdef0ff45e67ac63c7e220830c93b095e18
Author: Andrew Kelley <superjoe30@gmail.com>
Date:   Fri,  6 Jan 2017 02:04:27 -0500

don't mark call instruction as generated

pass cast unreachable test

Diffstat:
Msrc/ir.cpp | 2+-
Mtest/run_tests.cpp | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/ir.cpp b/src/ir.cpp @@ -3970,7 +3970,7 @@ static IrInstruction *ir_gen_fn_call(IrBuilder *irb, Scope *scope, AstNode *node } bool is_comptime = node->data.fn_call_expr.is_comptime; - return ir_mark_gen(ir_build_call(irb, scope, node, nullptr, fn_ref, arg_count, args, is_comptime)); + return ir_build_call(irb, scope, node, nullptr, fn_ref, arg_count, args, is_comptime); } static IrInstruction *ir_gen_if_bool_expr(IrBuilder *irb, Scope *scope, AstNode *node) { diff --git a/test/run_tests.cpp b/test/run_tests.cpp @@ -969,7 +969,7 @@ fn f() { fn f() -> i32 { i32(return 1) } - )SOURCE", 1, ".tmp_source.zig:3:8: error: invalid cast from type 'unreachable' to 'i32'"); + )SOURCE", 1, ".tmp_source.zig:3:8: error: unreachable code"); add_compile_fail_case("invalid builtin fn", R"SOURCE( fn f() -> @bogus(foo) {