File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -4018,14 +4018,15 @@ TypeSubstitutionMap TypeBase::getMemberSubstitutions(
4018
4018
isa<SubscriptDecl>(member)) {
4019
4019
auto *innerDC = member->getInnermostDeclContext ();
4020
4020
if (innerDC->isInnermostContextGeneric ()) {
4021
- auto sig = innerDC->getGenericSignatureOfContext ();
4022
- for (auto param : sig->getInnermostGenericParams ()) {
4023
- auto *genericParam = param->getCanonicalType ()
4024
- ->castTo <GenericTypeParamType>();
4025
- substitutions[genericParam] =
4026
- (genericEnv
4027
- ? genericEnv->mapTypeIntoContext (param)
4028
- : param);
4021
+ if (auto sig = innerDC->getGenericSignatureOfContext ()) {
4022
+ for (auto param : sig->getInnermostGenericParams ()) {
4023
+ auto *genericParam = param->getCanonicalType ()
4024
+ ->castTo <GenericTypeParamType>();
4025
+ substitutions[genericParam] =
4026
+ (genericEnv
4027
+ ? genericEnv->mapTypeIntoContext (param)
4028
+ : param);
4029
+ }
4029
4030
}
4030
4031
}
4031
4032
}
You can’t perform that action at this time.
0 commit comments