File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -5119,12 +5119,18 @@ TypeSubstitutionMap TypeBase::getMemberSubstitutions(
5119
5119
if (innerDC->isInnermostContextGeneric ()) {
5120
5120
if (auto sig = innerDC->getGenericSignatureOfContext ()) {
5121
5121
for (auto param : sig.getInnermostGenericParams ()) {
5122
- auto *genericParam = param->getCanonicalType ()
5123
- ->castTo <GenericTypeParamType>();
5124
- substitutions[genericParam] =
5125
- (genericEnv
5126
- ? genericEnv->mapTypeIntoContext (param)
5127
- : param);
5122
+ Type substGenericParam = param;
5123
+ if (param->isParameterPack ()) {
5124
+ substGenericParam = PackType::getSingletonPackExpansion (
5125
+ param);
5126
+ }
5127
+ if (genericEnv) {
5128
+ substGenericParam = genericEnv->mapTypeIntoContext (
5129
+ substGenericParam);
5130
+ }
5131
+
5132
+ auto *key = param->getCanonicalType ()->castTo <GenericTypeParamType>();
5133
+ substitutions[key] = substGenericParam;
5128
5134
}
5129
5135
}
5130
5136
}
You can’t perform that action at this time.
0 commit comments