Skip to content

Commit 4c1e2c6

Browse files
committed
[Diagnostics] Add nullptr check for anchor while fixing function result failures
1 parent 98a5c04 commit 4c1e2c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Sema/CSSimplify.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3509,7 +3509,7 @@ bool ConstraintSystem::repairFailures(
35093509
}
35103510
}
35113511
// Handle function result coerce expression wrong type conversion.
3512-
if (isa<CoerceExpr>(anchor)) {
3512+
if (anchor && isa<CoerceExpr>(anchor)) {
35133513
auto *fix =
35143514
ContextualMismatch::create(*this, lhs, rhs, loc);
35153515
conversionsOrFixes.push_back(fix);

0 commit comments

Comments
 (0)