File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -3021,7 +3021,9 @@ SILGenFunction::createWithoutActuallyEscapingClosure(
3021
3021
// Use the subsitution map in the context of the current function.
3022
3022
// thunk->getForwardingSubstitutionMap() / thunk might have been created in a
3023
3023
// different function's generic enviroment.
3024
+ SmallVector<Substitution, 4 > subs;
3024
3025
if (auto genericSig = thunkType->getGenericSignature ()) {
3026
+ genericSig->getSubstitutions (interfaceSubs, subs);
3025
3027
substFnTy = thunkType->substGenericArgs (F.getModule (), interfaceSubs);
3026
3028
}
3027
3029
@@ -3032,7 +3034,7 @@ SILGenFunction::createWithoutActuallyEscapingClosure(
3032
3034
SingleValueInstruction *thunkedFn = B.createPartialApply (
3033
3035
loc, thunkValue,
3034
3036
SILType::getPrimitiveObjectType (substFnTy),
3035
- interfaceSubs ,
3037
+ subs ,
3036
3038
noEscapeValue,
3037
3039
SILType::getPrimitiveObjectType (escapingFnTy));
3038
3040
// We need to ensure the 'lifetime' of the trivial values context captures. As
You can’t perform that action at this time.
0 commit comments