[ConstraintSystem] Bind holes to UnresolvedType instead of Any.

This commit is contained in:
Holly Borla
2019-10-10 12:05:58 -07:00
parent 3cdee649f5
commit e63f259f4f
17 changed files with 36 additions and 31 deletions

View File

@@ -740,7 +740,7 @@ ConstraintSystem::getPotentialBindings(TypeVariableType *typeVar) const {
if (shouldAttemptFixes() && result.Bindings.empty() &&
(isHole(typeVar) || result.isGenericParameter())) {
result.IsHole = true;
result.addPotentialBinding({getASTContext().TheAnyType,
result.addPotentialBinding({getASTContext().TheUnresolvedType,
AllowedBindingKind::Exact, ConstraintKind::Defaultable, nullptr,
typeVar->getImpl().getLocator()});
}