@@ -1444,7 +1444,7 @@ struct RequirementPrintLocation {
14441444// / callers check if the location is the ATD.
14451445static RequirementPrintLocation
14461446bestRequirementPrintLocation (ProtocolDecl *proto, const Requirement &req) {
1447- auto protoSelf = proto->getProtocolSelfType ();
1447+ auto protoSelf = proto->getSelfInterfaceType ();
14481448 // Returns the most relevant decl within proto connected to outerType (or null
14491449 // if one doesn't exist), and whether the type is an "direct use",
14501450 // i.e. outerType itself is Self or Self.T, but not, say, Self.T.U, or
@@ -1535,14 +1535,13 @@ bestRequirementPrintLocation(ProtocolDecl *proto, const Requirement &req) {
15351535void PrintAST::printInheritedFromRequirementSignature (ProtocolDecl *proto,
15361536 Decl *attachingTo) {
15371537 printGenericSignature (
1538- GenericSignature::get ({proto->getProtocolSelfType ()} ,
1539- proto->getRequirementSignature ().getRequirements ()),
1538+ proto->getRequirementSignatureAsGenericSignature (),
15401539 PrintInherited,
15411540 [&](const Requirement &req) {
15421541 // Skip the inferred 'Self : AnyObject' constraint if this is an
15431542 // @objc protocol.
15441543 if ((req.getKind () == RequirementKind::Layout) &&
1545- req.getFirstType ()->isEqual (proto->getProtocolSelfType ()) &&
1544+ req.getFirstType ()->isEqual (proto->getSelfInterfaceType ()) &&
15461545 req.getLayoutConstraint ()->getKind () ==
15471546 LayoutConstraintKind::Class &&
15481547 proto->isObjC ()) {
@@ -1560,8 +1559,7 @@ void PrintAST::printWhereClauseFromRequirementSignature(ProtocolDecl *proto,
15601559 if (isa<AssociatedTypeDecl>(attachingTo))
15611560 flags |= SwapSelfAndDependentMemberType;
15621561 printGenericSignature (
1563- GenericSignature::get ({proto->getProtocolSelfType ()} ,
1564- proto->getRequirementSignature ().getRequirements ()),
1562+ proto->getRequirementSignatureAsGenericSignature (),
15651563 flags,
15661564 [&](const Requirement &req) {
15671565 auto location = bestRequirementPrintLocation (proto, req);
0 commit comments