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 {
31033103 return true ;
31043104 return false ;
31053105 }
3106+
3107+ Param getCanonical (CanGenericSignature genericSig) const ;
31063108
31073109 ParameterTypeFlags getParameterFlags () const { return Flags; }
31083110
Original file line number Diff line number Diff line change @@ -1606,14 +1606,19 @@ getCanonicalParams(AnyFunctionType *funcType,
16061606 SmallVectorImpl<AnyFunctionType::Param> &canParams) {
16071607 auto origParams = funcType->getParams ();
16081608 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));
16141610 }
16151611}
16161612
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+
16171622CanType TypeBase::computeCanonicalType () {
16181623 assert (!hasCanonicalTypeComputed () && " called unnecessarily" );
16191624
You can’t perform that action at this time.
0 commit comments