authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-01-05 19:25:36-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-01-05 19:25:36-05:00
log23feafdef0ff45e67ac63c7e220830c93b095e18
treebfe39f0d5709d585b6d1e800ede2bf4d76b76872
parent28403eaad0c4da28ff31152edbe2af659b2af500

pass more tests

by removing assertion, fixing error column, and updating expected message

3 files changed, 2 insertions(+), 4 deletions(-)

src/analyze.cpp-2
......@@ -1393,8 +1393,6 @@ static void resolve_struct_type(CodeGen *g, TypeTableEntry *struct_type) {
13931393
13941394 ZigLLVMReplaceTemporary(g->dbuilder, struct_type->di_type, replacement_di_type);
13951395 struct_type->di_type = replacement_di_type;
1396
1397 assert((debug_size_in_bits == 0) == struct_type->zero_bits);
13981396}
13991397
14001398static 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,
91219121 if (type_entry->id == TypeTableEntryIdInvalid) {
91229122 return ira->codegen->builtin_types.entry_invalid;
91239123 } 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,
91259125 buf_sprintf("expected nullable type, found '%s'", buf_ptr(&type_entry->name)));
91269126 return ira->codegen->builtin_types.entry_invalid;
91279127 }
test/run_tests.cpp+1-1
......@@ -963,7 +963,7 @@ fn f() {
963963fn f() {
964964 if (const x ?= true) { }
965965}
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'");
967967
968968 add_compile_fail_case("cast unreachable", R"SOURCE(
969969fn f() -> i32 {