mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[ConstraintSystem] Mark member result type as a potential hole if base was incorrect
If it has been established that member found via static member lookup on protocol metatype doesn't have correct result type, chain's result type the should be treated as a hole.
This commit is contained in:
@@ -4556,6 +4556,10 @@ bool ConstraintSystem::repairFailures(
|
||||
}
|
||||
|
||||
case ConstraintLocator::UnresolvedMemberChainResult: {
|
||||
// Ignore this mismatch if result is already a hole.
|
||||
if (rhs->isHole())
|
||||
return true;
|
||||
|
||||
if (repairViaOptionalUnwrap(*this, lhs, rhs, matchKind, conversionsOrFixes,
|
||||
locator))
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user