fix regression with zero sized array

thanks mikdusan!
This commit is contained in:
Andrew Kelley
2019-06-21 00:58:18 -04:00
parent 708f153288
commit 4f21dc8a80
2 changed files with 11 additions and 0 deletions

View File

@@ -15200,6 +15200,9 @@ static IrInstruction *ir_resolve_result(IrAnalyze *ira, IrInstruction *suspend_s
return unwrapped_err_ptr;
}
}
} else if (is_slice(actual_elem_type) && value_type->id == ZigTypeIdArray) {
// need to allow EndExpr to do the implicit cast from array to slice
result_loc_pass1->written = false;
}
return result_loc;
}