Skip to content

Commit 7ed5509

Browse files
committed
Sema: Simplify DerivedConformance::createBuiltinCall()
1 parent af3ab14 commit 7ed5509

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

lib/Sema/DerivedConformances.cpp

+1-12
Original file line numberDiff line numberDiff line change
@@ -472,18 +472,7 @@ DerivedConformance::createBuiltinCall(ASTContext &ctx,
472472
if (auto genericFnType = fnType->getAs<GenericFunctionType>()) {
473473
auto builtinModule = decl->getModuleContext();
474474
auto generics = genericFnType->getGenericSignature();
475-
476-
auto genericParams = generics.getGenericParams();
477-
assert(genericParams.size() == typeArgs.size());
478-
479-
TypeSubstitutionMap map;
480-
for (auto i : indices(genericParams))
481-
map.insert({genericParams[i]->getCanonicalType()
482-
->getAs<SubstitutableType>(),
483-
typeArgs[i]});
484-
485-
auto subs = SubstitutionMap::get(generics,
486-
QueryTypeSubstitutionMap{map},
475+
auto subs = SubstitutionMap::get(generics, typeArgs,
487476
LookUpConformanceInModule{builtinModule});
488477
declRef = ConcreteDeclRef(decl, subs);
489478
fnType = genericFnType->substGenericArgs(subs);

0 commit comments

Comments
 (0)