Sema: Fix module interface printing of inherited generic initializers

Make sure we use the sugared form of GenericTypeParamType and not
the canonical type.

Fixes <rdar://problem/58578998>.
This commit is contained in:
Slava Pestov
2020-01-28 17:11:15 -08:00
parent 454b30dc80
commit 3c86061de8
2 changed files with 7 additions and 4 deletions

View File

@@ -411,10 +411,8 @@ configureGenericDesignatedInitOverride(ASTContext &ctx,
auto *gp = cast<GenericTypeParamType>(type);
if (gp->getDepth() < superclassDepth)
return Type(gp).subst(subMap);
return CanGenericTypeParamType::get(
gp->getDepth() - superclassDepth + depth,
gp->getIndex(),
ctx);
return genericParams->getParams()[gp->getIndex()]
->getDeclaredInterfaceType();
};
auto lookupConformanceFn =