File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1889,6 +1889,11 @@ SILFunction *ReabstractionThunkGenerator::createThunk() {
1889
1889
1890
1890
Thunk->setGenericEnvironment (ReInfo.getSpecializedGenericEnvironment ());
1891
1891
1892
+ // Set proper generic context scope for the type lowering.
1893
+ CanSILFunctionType SpecType = SpecializedFunc->getLoweredFunctionType ();
1894
+ Lowering::GenericContextScope GenericScope (M.Types ,
1895
+ SpecType->getGenericSignature ());
1896
+
1892
1897
SILBasicBlock *EntryBB = Thunk->createBasicBlock ();
1893
1898
SILBuilder Builder (EntryBB);
1894
1899
@@ -1980,9 +1985,6 @@ SILArgument *ReabstractionThunkGenerator::convertReabstractionThunkArguments(
1980
1985
1981
1986
assert (specConv.useLoweredAddresses ());
1982
1987
1983
- Lowering::GenericContextScope GenericScope (M.Types ,
1984
- SpecType->getGenericSignature ());
1985
-
1986
1988
// ReInfo.NumIndirectResults corresponds to SubstTy's formal indirect
1987
1989
// results. SpecTy may have fewer formal indirect results.
1988
1990
assert (SubstType->getNumIndirectFormalResults ()
You can’t perform that action at this time.
0 commit comments