@@ -2109,22 +2109,6 @@ PolymorphicFunctionType::getGenericParameters() const {
2109
2109
return Params->getParams ();
2110
2110
}
2111
2111
2112
- FunctionType *PolymorphicFunctionType::substGenericArgs (Module *module ,
2113
- ArrayRef<Type> args) {
2114
- TypeSubstitutionMap map;
2115
- for (auto ¶m : getGenericParams ().getNestedGenericParams ()) {
2116
- map.insert (std::make_pair (param->getArchetype (), args.front ()));
2117
- args = args.slice (1 );
2118
- }
2119
-
2120
- assert (args.empty ()
2121
- && " number of args did not match number of generic params" );
2122
-
2123
- Type input = getInput ().subst (module , map, SubstFlags::IgnoreMissing);
2124
- Type result = getResult ().subst (module , map, SubstFlags::IgnoreMissing);
2125
- return FunctionType::get (input, result, getExtInfo ());
2126
- }
2127
-
2128
2112
TypeSubstitutionMap
2129
2113
GenericParamList::getSubstitutionMap (ArrayRef<swift::Substitution> Subs) const {
2130
2114
TypeSubstitutionMap map;
@@ -2140,16 +2124,6 @@ GenericParamList::getSubstitutionMap(ArrayRef<swift::Substitution> Subs) const {
2140
2124
return map;
2141
2125
}
2142
2126
2143
- FunctionType *PolymorphicFunctionType::substGenericArgs (Module *module ,
2144
- ArrayRef<Substitution> subs) {
2145
- TypeSubstitutionMap map
2146
- = getGenericParams ().getSubstitutionMap (subs);
2147
-
2148
- Type input = getInput ().subst (module , map, SubstFlags::IgnoreMissing);
2149
- Type result = getResult ().subst (module , map, SubstFlags::IgnoreMissing);
2150
- return FunctionType::get (input, result, getExtInfo ());
2151
- }
2152
-
2153
2127
FunctionType *
2154
2128
GenericFunctionType::substGenericArgs (Module *M, ArrayRef<Type> args) const {
2155
2129
auto params = getGenericParams ();
0 commit comments