fix result loc of cast not finding parent

This commit is contained in:
Andrew Kelley
2019-11-07 14:46:48 -05:00
parent e0db54e89d
commit fa34dfcce7
3 changed files with 8 additions and 8 deletions

View File

@@ -15733,7 +15733,7 @@ static IrInstruction *ir_resolve_result_raw(IrAnalyze *ira, IrInstruction *suspe
casted_value = nullptr;
}
if (casted_value == nullptr || type_is_invalid(casted_value->value.type)) {
if (casted_value != nullptr && type_is_invalid(casted_value->value.type)) {
return casted_value;
}