Skip to content

Commit 06b4953

Browse files
committed
Sema: Remove a usage of QueryTypeSubstitutionMap
1 parent 09df48f commit 06b4953

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/Sema/CSApply.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Solution::computeSubstitutions(NullablePtr<ValueDecl> decl,
103103
if (openedTypes == OpenedTypes.end())
104104
return SubstitutionMap();
105105

106-
TypeSubstitutionMap subs;
106+
SmallVector<Type, 4> replacementTypes;
107107
for (const auto &opened : openedTypes->second) {
108108
auto type = getFixedType(opened.second);
109109
if (opened.first->isParameterPack()) {
@@ -115,7 +115,7 @@ Solution::computeSubstitutions(NullablePtr<ValueDecl> decl,
115115
} else if (!type->is<PackType>())
116116
type = PackType::getSingletonPackExpansion(type);
117117
}
118-
subs[opened.first] = type;
118+
replacementTypes.push_back(type);
119119
}
120120

121121
auto lookupConformanceFn =
@@ -145,7 +145,7 @@ Solution::computeSubstitutions(NullablePtr<ValueDecl> decl,
145145
};
146146

147147
return SubstitutionMap::get(sig,
148-
QueryTypeSubstitutionMap{subs},
148+
replacementTypes,
149149
lookupConformanceFn);
150150
}
151151

0 commit comments

Comments
 (0)