File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -3103,6 +3103,8 @@ class AnyFunctionType : public TypeBase {
3103
3103
return true ;
3104
3104
return false ;
3105
3105
}
3106
+
3107
+ Param getCanonical (CanGenericSignature genericSig) const ;
3106
3108
3107
3109
ParameterTypeFlags getParameterFlags () const { return Flags; }
3108
3110
Original file line number Diff line number Diff line change @@ -1606,14 +1606,19 @@ getCanonicalParams(AnyFunctionType *funcType,
1606
1606
SmallVectorImpl<AnyFunctionType::Param> &canParams) {
1607
1607
auto origParams = funcType->getParams ();
1608
1608
for (auto param : origParams) {
1609
- // Canonicalize the type and drop the internal label to canonicalize the
1610
- // Param.
1611
- canParams.emplace_back (param.getPlainType ()->getReducedType (genericSig),
1612
- param.getLabel (), param.getParameterFlags (),
1613
- /* InternalLabel=*/ Identifier ());
1609
+ canParams.emplace_back (param.getCanonical (genericSig));
1614
1610
}
1615
1611
}
1616
1612
1613
+ AnyFunctionType::Param
1614
+ AnyFunctionType::Param::getCanonical (CanGenericSignature genericSig) const {
1615
+ // Canonicalize the type and drop the internal label to canonicalize the
1616
+ // Param.
1617
+ return Param (getPlainType ()->getReducedType (genericSig),
1618
+ getLabel (), getParameterFlags (),
1619
+ /* InternalLabel=*/ Identifier ());
1620
+ }
1621
+
1617
1622
CanType TypeBase::computeCanonicalType () {
1618
1623
assert (!hasCanonicalTypeComputed () && " called unnecessarily" );
1619
1624
You can’t perform that action at this time.
0 commit comments