Skip to content

Commit 6ec4a54

Browse files
committed
Sema: Remove a usage of QueryTypeSubstitutionMap
1 parent b109c1b commit 6ec4a54

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 =
@@ -141,7 +141,7 @@ Solution::computeSubstitutions(NullablePtr<ValueDecl> decl,
141141
};
142142

143143
return SubstitutionMap::get(sig,
144-
QueryTypeSubstitutionMap{subs},
144+
replacementTypes,
145145
lookupConformanceFn);
146146
}
147147

0 commit comments

Comments
 (0)