@@ -167,12 +167,10 @@ static bool isExtensionAppliedInternal(const DeclContext *DC, Type BaseTy,
167
167
if (isExtensionWithSelfBound (ED, BaseTypeProtocolDecl)) {
168
168
return true ;
169
169
}
170
- auto *module = DC->getParentModule ();
171
170
GenericSignature genericSig = ED->getGenericSignature ();
172
171
SubstitutionMap substMap = BaseTy->getContextSubstitutionMap (
173
172
ED->getExtendedNominal ());
174
- return checkRequirements (module,
175
- genericSig.getRequirements (),
173
+ return checkRequirements (genericSig.getRequirements (),
176
174
QuerySubstitutionMap{substMap}) ==
177
175
CheckRequirementsResult::Success;
178
176
}
@@ -210,7 +208,6 @@ static bool isMemberDeclAppliedInternal(const DeclContext *DC, Type BaseTy,
210
208
211
209
// The context substitution map for the base type fixes the declaration's
212
210
// outer generic parameters.
213
- auto *module = DC->getParentModule ();
214
211
auto substMap = BaseTy->getContextSubstitutionMap (
215
212
VD->getDeclContext (), genericDecl->getGenericEnvironment ());
216
213
@@ -221,8 +218,7 @@ static bool isMemberDeclAppliedInternal(const DeclContext *DC, Type BaseTy,
221
218
222
219
// We treat substitution failure as success, to ignore requirements
223
220
// that involve innermost generic parameters.
224
- return checkRequirements (module,
225
- genericSig.getRequirements (),
221
+ return checkRequirements (genericSig.getRequirements (),
226
222
[&](SubstitutableType *type) -> Type {
227
223
auto *paramTy = cast<GenericTypeParamType>(type);
228
224
if (paramTy->getDepth () == innerDepth)
0 commit comments