| author | |
| committer | |
| log | 23feafdef0ff45e67ac63c7e220830c93b095e18 |
| tree | bfe39f0d5709d585b6d1e800ede2bf4d76b76872 |
| parent | 28403eaad0c4da28ff31152edbe2af659b2af500 |
by removing assertion, fixing error column,
and updating expected message3 files changed, 2 insertions(+), 4 deletions(-)
src/analyze.cpp-2| ... | ... | @@ -1393,8 +1393,6 @@ static void resolve_struct_type(CodeGen *g, TypeTableEntry *struct_type) { |
| 1393 | 1393 | |
| 1394 | 1394 | ZigLLVMReplaceTemporary(g->dbuilder, struct_type->di_type, replacement_di_type); |
| 1395 | 1395 | struct_type->di_type = replacement_di_type; |
| 1396 | ||
| 1397 | assert((debug_size_in_bits == 0) == struct_type->zero_bits); | |
| 1398 | 1396 | } |
| 1399 | 1397 | |
| 1400 | 1398 | static void resolve_union_type(CodeGen *g, TypeTableEntry *union_type) { |
src/ir.cpp+1-1| ... | ... | @@ -9121,7 +9121,7 @@ static TypeTableEntry *ir_analyze_instruction_unwrap_maybe(IrAnalyze *ira, |
| 9121 | 9121 | if (type_entry->id == TypeTableEntryIdInvalid) { |
| 9122 | 9122 | return ira->codegen->builtin_types.entry_invalid; |
| 9123 | 9123 | } else if (type_entry->id != TypeTableEntryIdMaybe) { |
| 9124 | ir_add_error_node(ira, unwrap_maybe_instruction->base.source_node, | |
| 9124 | ir_add_error_node(ira, unwrap_maybe_instruction->value->source_node, | |
| 9125 | 9125 | buf_sprintf("expected nullable type, found '%s'", buf_ptr(&type_entry->name))); |
| 9126 | 9126 | return ira->codegen->builtin_types.entry_invalid; |
| 9127 | 9127 | } |
test/run_tests.cpp+1-1| ... | ... | @@ -963,7 +963,7 @@ fn f() { |
| 963 | 963 | fn f() { |
| 964 | 964 | if (const x ?= true) { } |
| 965 | 965 | } |
| 966 | )SOURCE", 1, ".tmp_source.zig:3:20: error: expected maybe type"); | |
| 966 | )SOURCE", 1, ".tmp_source.zig:3:20: error: expected nullable type, found 'bool'"); | |
| 967 | 967 | |
| 968 | 968 | add_compile_fail_case("cast unreachable", R"SOURCE( |
| 969 | 969 | fn f() -> i32 { |