mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[CSSimplify] Mark all type variables in member type as holes if base is a hole
Even if the member type variable is partially resolved, we still need to mark inner type variables (if any) as holes because they might not be connected to anything that could provide contextual type(s). Resolves: rdar://124549952
This commit is contained in:
@@ -10739,8 +10739,7 @@ ConstraintSystem::SolutionKind ConstraintSystem::simplifyMemberConstraint(
|
||||
// reason to perform a lookup because it wouldn't return any results.
|
||||
if (shouldAttemptFixes()) {
|
||||
auto markMemberTypeAsPotentialHole = [&](Type memberTy) {
|
||||
if (auto *typeVar = memberTy->getAs<TypeVariableType>())
|
||||
recordPotentialHole(typeVar);
|
||||
recordAnyTypeVarAsPotentialHole(simplifyType(memberTy));
|
||||
};
|
||||
|
||||
// If this is an unresolved member ref e.g. `.foo` and its contextual base
|
||||
|
||||
Reference in New Issue
Block a user