[ConstraintSystem] Resolve dependent member as a hole if base is one

Instead of preserving unresolved dependent member types, let's resolve
them as holes if their base has been determined to be one.
This commit is contained in:
Pavel Yaskevich
2021-07-02 12:31:02 -07:00
parent ff7fdc5119
commit aea8d246b5
2 changed files with 5 additions and 2 deletions

View File

@@ -4274,8 +4274,7 @@ bool ConstraintSystem::repairFailures(
// it's going to be diagnosed by specialized fix which deals
// with generic argument mismatches.
if (matchKind == ConstraintKind::BindToPointerType) {
auto *member = rhs->getAs<DependentMemberType>();
if (!(member && member->getBase()->hasPlaceholder()))
if (!rhs->isPlaceholder())
break;
}