behavior tests passing

master
Andrew Kelley 2019-11-07 18:13:17 -05:00
parent 8954a1bae5
commit a2acc27872
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9
2 changed files with 5 additions and 1 deletions

View File

@ -17542,6 +17542,10 @@ static IrInstruction *ir_analyze_instruction_phi(IrAnalyze *ira, IrInstructionPh
if (peer_parent != nullptr && ir_result_has_type(peer_parent->parent)) {
if (peer_parent->parent->id == ResultLocIdReturn) {
resolved_type = ira->explicit_return_type;
} else if (peer_parent->parent->id == ResultLocIdCast) {
resolved_type = ir_resolve_type(ira, peer_parent->parent->source_instruction->child);
if (type_is_invalid(resolved_type))
return ira->codegen->invalid_instruction;
} else {
ZigType *resolved_loc_ptr_type = peer_parent->parent->resolved_loc->value.type;
ir_assert(resolved_loc_ptr_type->id == ZigTypeIdPointer, &phi_instruction->base);

View File

@ -59,7 +59,7 @@ comptime {
_ = @import("behavior/eval.zig");
_ = @import("behavior/field_parent_ptr.zig");
_ = @import("behavior/floatop.zig");
//_ = @import("behavior/fn.zig");
_ = @import("behavior/fn.zig");
_ = @import("behavior/fn_in_struct_in_comptime.zig");
_ = @import("behavior/fn_delegation.zig");
_ = @import("behavior/for.zig");