mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[CS] Eagerly bind hole in recordInvalidNode
We know this is where the issue is so we can immediately bind to a hole, ensuring we don't produce unnecessary downstream diagnostics from things we can't infer.
This commit is contained in:
@@ -6694,6 +6694,10 @@ bool ConstraintSystem::repairFailures(
|
||||
}
|
||||
|
||||
case ConstraintLocator::Condition: {
|
||||
// If the condition is already a hole, we're done.
|
||||
if (lhs->isPlaceholder())
|
||||
return true;
|
||||
|
||||
if (repairViaOptionalUnwrap(*this, lhs, rhs, matchKind, conversionsOrFixes,
|
||||
locator))
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user