Sema: Replace calls to subst() on a GenericFunctionType with substGenericArgs()

This commit is contained in:
Slava Pestov
2025-03-25 18:25:07 -04:00
parent 0c29f7f410
commit ed441e0ea2
6 changed files with 43 additions and 22 deletions

View File

@@ -666,7 +666,9 @@ synthesizeDesignatedInitOverride(AbstractFunctionDecl *fn, void *context) {
.subst(subs);
ConcreteDeclRef ctorRef(superclassCtor, subs);
auto type = superclassCtor->getInitializerInterfaceType().subst(subs);
auto type = superclassCtor->getInitializerInterfaceType();
if (auto *genericFnType = type->getAs<GenericFunctionType>())
type = genericFnType->substGenericArgs(subs);
auto *ctorRefExpr =
new (ctx) OtherConstructorDeclRefExpr(ctorRef, DeclNameLoc(),
IsImplicit, type);