diff --git a/src/analyze.cpp b/src/analyze.cpp index ac9563c8a317cd20376a80bed2c75f05ddcc9a07..1c9ddb7e2ed0ff417de7abdb8c7dfdcebc7f75b3 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -1393,8 +1393,6 @@ static void resolve_struct_type(CodeGen *g, TypeTableEntry *struct_type) { ZigLLVMReplaceTemporary(g->dbuilder, struct_type->di_type, replacement_di_type); struct_type->di_type = replacement_di_type; - - assert((debug_size_in_bits == 0) == struct_type->zero_bits); } static void resolve_union_type(CodeGen *g, TypeTableEntry *union_type) { diff --git a/src/ir.cpp b/src/ir.cpp index 824c3ec2a173515fcbd3eb24073aad9a39fa0a50..fa270e5f3af6b4a6c86b1bebd3c26c083e938915 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -9121,7 +9121,7 @@ static TypeTableEntry *ir_analyze_instruction_unwrap_maybe(IrAnalyze *ira, if (type_entry->id == TypeTableEntryIdInvalid) { return ira->codegen->builtin_types.entry_invalid; } else if (type_entry->id != TypeTableEntryIdMaybe) { - ir_add_error_node(ira, unwrap_maybe_instruction->base.source_node, + ir_add_error_node(ira, unwrap_maybe_instruction->value->source_node, buf_sprintf("expected nullable type, found '%s'", buf_ptr(&type_entry->name))); return ira->codegen->builtin_types.entry_invalid; } diff --git a/test/run_tests.cpp b/test/run_tests.cpp index 2a2d4d640a47deeb0faadf4e0c69c65530e8a6b1..97f0c2a788b4c5fff16217c8ca77238a772e890b 100644 --- a/test/run_tests.cpp +++ b/test/run_tests.cpp @@ -963,7 +963,7 @@ fn f() { fn f() { if (const x ?= true) { } } - )SOURCE", 1, ".tmp_source.zig:3:20: error: expected maybe type"); + )SOURCE", 1, ".tmp_source.zig:3:20: error: expected nullable type, found 'bool'"); add_compile_fail_case("cast unreachable", R"SOURCE( fn f() -> i32 {