mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #21244 from jckarter/archetype-subclasses
Split subclasses out of ArchetypeType.
This commit is contained in:
@@ -1020,7 +1020,7 @@ static void bindArchetypesFromContext(
|
||||
ConstraintLocator *locatorPtr,
|
||||
const OpenedTypeMap &replacements) {
|
||||
|
||||
auto bindContextArchetype = [&](Type paramTy, Type contextTy) {
|
||||
auto bindPrimaryArchetype = [&](Type paramTy, Type contextTy) {
|
||||
auto found = replacements.find(cast<GenericTypeParamType>(
|
||||
paramTy->getCanonicalType()));
|
||||
|
||||
@@ -1044,7 +1044,7 @@ static void bindArchetypesFromContext(
|
||||
if (parentDC != outerDC && parentDC->getSelfProtocolDecl()) {
|
||||
auto selfTy = parentDC->getSelfInterfaceType();
|
||||
auto contextTy = cs.TC.Context.TheUnresolvedType;
|
||||
bindContextArchetype(selfTy, contextTy);
|
||||
bindPrimaryArchetype(selfTy, contextTy);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
@@ -1056,7 +1056,7 @@ static void bindArchetypesFromContext(
|
||||
|
||||
for (auto *paramTy : genericSig->getGenericParams()) {
|
||||
Type contextTy = cs.DC->mapTypeIntoContext(paramTy);
|
||||
bindContextArchetype(paramTy, contextTy);
|
||||
bindPrimaryArchetype(paramTy, contextTy);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user