zig

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

commit 7e303fa28feaa10d7dbf08fdc3e86c47bba882e6 (tree)
parent 2b1695b1b03b42719f02c4ed4d4b5d3495a2ca3a
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Sat, 22 Jun 2019 19:02:59 -0400

fix another crash

Diffstat:
Msrc/ir.cpp | 3+++
Mstd/std.zig | 2+-
2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/ir.cpp b/src/ir.cpp @@ -15092,6 +15092,9 @@ static IrInstruction *ir_resolve_result_raw(IrAnalyze *ira, IrInstruction *suspe if (is_comptime) return nullptr; } + if ((err = type_resolve(ira->codegen, ira->explicit_return_type, ResolveStatusZeroBitsKnown))) { + return ira->codegen->invalid_instruction; + } if (!type_has_bits(ira->explicit_return_type) || !handle_is_ptr(ira->explicit_return_type)) return nullptr; diff --git a/std/std.zig b/std/std.zig @@ -91,7 +91,7 @@ test "std" { _ = @import("heap.zig"); _ = @import("io.zig"); _ = @import("json.zig"); - //_ = @import("lazy_init.zig"); + _ = @import("lazy_init.zig"); _ = @import("macho.zig"); _ = @import("math.zig"); _ = @import("mem.zig");