File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -842,16 +842,22 @@ Type ASTBuilder::createSILBoxTypeWithLayout(
842
842
ArrayRef<BuiltSubstitution> Substitutions,
843
843
ArrayRef<BuiltRequirement> Requirements) {
844
844
SmallVector<Type, 4 > replacements;
845
- SmallVector<GenericTypeParamType *, 4 > genericTypeParams;
845
+ SmallVector<GenericTypeParamType *, 2 > genericTypeParams;
846
846
for (const auto &s : Substitutions) {
847
847
if (auto *t = dyn_cast_or_null<GenericTypeParamType>(s.first .getPointer ()))
848
848
genericTypeParams.push_back (t);
849
849
replacements.push_back (s.second );
850
850
}
851
851
852
852
GenericSignature signature;
853
- if (!genericTypeParams.empty ())
854
- signature = GenericSignature::get (genericTypeParams, Requirements);
853
+ if (!genericTypeParams.empty ()) {
854
+ SmallVector<BuiltRequirement, 2 > RequirementsVec (Requirements);
855
+ signature = swift::buildGenericSignature (Ctx,
856
+ signature,
857
+ genericTypeParams,
858
+ std::move (RequirementsVec),
859
+ /* allowInverses=*/ true );
860
+ }
855
861
SmallVector<SILField, 4 > silFields;
856
862
for (auto field: fields)
857
863
silFields.emplace_back (field.getPointer ()->getCanonicalType (),
You can’t perform that action at this time.
0 commit comments