authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-11-07 18:13:17-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-11-08 15:57:25-05:00
loga2acc2787242fdee189ec4197c0dd847b8245139
tree80cec322f4f887e5e242bd417a3a762fcdb8cb7a
parent8954a1bae5540b390188ee728a13a5d33957546e
signaturelock-open Commit is signed but in an unrecognized format.

behavior tests passing


2 files changed, 5 insertions(+), 1 deletions(-)

src/ir.cpp+4
...@@ -17542,6 +17542,10 @@ static IrInstruction *ir_analyze_instruction_phi(IrAnalyze *ira, IrInstructionPh...@@ -17542,6 +17542,10 @@ static IrInstruction *ir_analyze_instruction_phi(IrAnalyze *ira, IrInstructionPh
17542 if (peer_parent != nullptr && ir_result_has_type(peer_parent->parent)) {17542 if (peer_parent != nullptr && ir_result_has_type(peer_parent->parent)) {
17543 if (peer_parent->parent->id == ResultLocIdReturn) {17543 if (peer_parent->parent->id == ResultLocIdReturn) {
17544 resolved_type = ira->explicit_return_type;17544 resolved_type = ira->explicit_return_type;
17545 } else if (peer_parent->parent->id == ResultLocIdCast) {
17546 resolved_type = ir_resolve_type(ira, peer_parent->parent->source_instruction->child);
17547 if (type_is_invalid(resolved_type))
17548 return ira->codegen->invalid_instruction;
17545 } else {17549 } else {
17546 ZigType *resolved_loc_ptr_type = peer_parent->parent->resolved_loc->value.type;17550 ZigType *resolved_loc_ptr_type = peer_parent->parent->resolved_loc->value.type;
17547 ir_assert(resolved_loc_ptr_type->id == ZigTypeIdPointer, &phi_instruction->base);17551 ir_assert(resolved_loc_ptr_type->id == ZigTypeIdPointer, &phi_instruction->base);
test/stage1/behavior.zig+1-1
...@@ -59,7 +59,7 @@ comptime {...@@ -59,7 +59,7 @@ comptime {
59 _ = @import("behavior/eval.zig");59 _ = @import("behavior/eval.zig");
60 _ = @import("behavior/field_parent_ptr.zig");60 _ = @import("behavior/field_parent_ptr.zig");
61 _ = @import("behavior/floatop.zig");61 _ = @import("behavior/floatop.zig");
62 //_ = @import("behavior/fn.zig");62 _ = @import("behavior/fn.zig");
63 _ = @import("behavior/fn_in_struct_in_comptime.zig");63 _ = @import("behavior/fn_in_struct_in_comptime.zig");
64 _ = @import("behavior/fn_delegation.zig");64 _ = @import("behavior/fn_delegation.zig");
65 _ = @import("behavior/for.zig");65 _ = @import("behavior/for.zig");