Merge pull request #85538 from hamishknight/binding-fixes

[Sema] A couple of binding-related crasher fixes
This commit is contained in:
Hamish Knight
2025-11-18 19:48:25 +00:00
committed by GitHub
10 changed files with 108 additions and 46 deletions

View File

@@ -5582,6 +5582,10 @@ bool ConstraintSystem::repairFailures(
if (!anchor)
return false;
// If we have an ErrorExpr anchor, we don't need to do any more fixes.
if (isExpr<ErrorExpr>(anchor))
return true;
// This could be:
// - `InOutExpr` used with r-value e.g. `foo(&x)` where `x` is a `let`.
// - `ForceValueExpr` e.g. `foo.bar! = 42` where `bar` or `foo` are