Skip to content

Commit 7357bb2

Browse files
committed
Adjust to swift-4.2-branch
1 parent dbdea27 commit 7357bb2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/SILGen/SILGenPoly.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3021,7 +3021,9 @@ SILGenFunction::createWithoutActuallyEscapingClosure(
30213021
// Use the subsitution map in the context of the current function.
30223022
// thunk->getForwardingSubstitutionMap() / thunk might have been created in a
30233023
// different function's generic enviroment.
3024+
SmallVector<Substitution, 4> subs;
30243025
if (auto genericSig = thunkType->getGenericSignature()) {
3026+
genericSig->getSubstitutions(interfaceSubs, subs);
30253027
substFnTy = thunkType->substGenericArgs(F.getModule(), interfaceSubs);
30263028
}
30273029

@@ -3032,7 +3034,7 @@ SILGenFunction::createWithoutActuallyEscapingClosure(
30323034
SingleValueInstruction *thunkedFn = B.createPartialApply(
30333035
loc, thunkValue,
30343036
SILType::getPrimitiveObjectType(substFnTy),
3035-
interfaceSubs,
3037+
subs,
30363038
noEscapeValue,
30373039
SILType::getPrimitiveObjectType(escapingFnTy));
30383040
// We need to ensure the 'lifetime' of the trivial values context captures. As

0 commit comments

Comments
 (0)