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) {...@@ -1393,8 +1393,6 @@ static void resolve_struct_type(CodeGen *g, TypeTableEntry *struct_type) {
13931393
1394 ZigLLVMReplaceTemporary(g->dbuilder, struct_type->di_type, replacement_di_type);1394 ZigLLVMReplaceTemporary(g->dbuilder, struct_type->di_type, replacement_di_type);
1395 struct_type->di_type = replacement_di_type;1395 struct_type->di_type = replacement_di_type;
1396
1397 assert((debug_size_in_bits == 0) == struct_type->zero_bits);
1398}1396}
13991397
1400static void resolve_union_type(CodeGen *g, TypeTableEntry *union_type) {1398static 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,7 +9121,7 @@ static TypeTableEntry *ir_analyze_instruction_unwrap_maybe(IrAnalyze *ira,
9121 if (type_entry->id == TypeTableEntryIdInvalid) {9121 if (type_entry->id == TypeTableEntryIdInvalid) {
9122 return ira->codegen->builtin_types.entry_invalid;9122 return ira->codegen->builtin_types.entry_invalid;
9123 } else if (type_entry->id != TypeTableEntryIdMaybe) {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 buf_sprintf("expected nullable type, found '%s'", buf_ptr(&type_entry->name)));9125 buf_sprintf("expected nullable type, found '%s'", buf_ptr(&type_entry->name)));
9126 return ira->codegen->builtin_types.entry_invalid;9126 return ira->codegen->builtin_types.entry_invalid;
9127 }9127 }
test/run_tests.cpp+1-1
...@@ -963,7 +963,7 @@ fn f() {...@@ -963,7 +963,7 @@ fn f() {
963fn f() {963fn f() {
964 if (const x ?= true) { }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'");
967967
968 add_compile_fail_case("cast unreachable", R"SOURCE(968 add_compile_fail_case("cast unreachable", R"SOURCE(
969fn f() -> i32 {969fn f() -> i32 {