Push ArchetypeType's API down to subclasses.

And clean up code that conditionally works only with certain kinds of archetype along the way.
This commit is contained in:
Joe Groff
2018-12-12 13:26:16 -08:00
parent 4f0f11f6bb
commit 89979137fc
37 changed files with 265 additions and 328 deletions

View File

@@ -1322,7 +1322,7 @@ ConstraintSystem::getTypeOfMemberReference(
Type baseOpenedTy = baseObjTy;
if (baseObjTy->isExistentialType()) {
ArchetypeType *openedArchetype = ArchetypeType::getOpened(baseObjTy);
auto openedArchetype = OpenedArchetypeType::get(baseObjTy);
OpenedExistentialTypes.push_back({ getConstraintLocator(locator),
openedArchetype });
baseOpenedTy = openedArchetype;