@@ -2148,7 +2148,7 @@ static void checkSpecializeAttrRequirements(SpecializeAttr *attr,
21482148 ASTContext &ctx) {
21492149 bool hadError = false ;
21502150
2151- auto specializedReqs = specializedSig-> requirementsNotSatisfiedBy (originalSig);
2151+ auto specializedReqs = specializedSig. requirementsNotSatisfiedBy (originalSig);
21522152 for (auto specializedReq : specializedReqs) {
21532153 if (!specializedReq.getFirstType ()->is <GenericTypeParamType>()) {
21542154 ctx.Diags .diagnose (attr->getLocation (),
@@ -4687,18 +4687,10 @@ static bool typeCheckDerivativeAttr(ASTContext &Ctx, Decl *D,
46874687 // Returns true if the generic parameters in `source` satisfy the generic
46884688 // requirements in `target`.
46894689 std::function<bool (GenericSignature, GenericSignature)>
4690- checkGenericSignatureSatisfied = [&](GenericSignature source,
4691- GenericSignature target) {
4692- // If target is null, then its requirements are satisfied.
4693- if (!target)
4694- return true ;
4695- // If source is null but target is not null, then target's
4696- // requirements are not satisfied.
4697- if (!source)
4698- return false ;
4699-
4700- return target->requirementsNotSatisfiedBy (source).empty ();
4701- };
4690+ checkGenericSignatureSatisfied =
4691+ [&](GenericSignature source, GenericSignature target) {
4692+ return target.requirementsNotSatisfiedBy (source).empty ();
4693+ };
47024694
47034695 // Returns true if the derivative function and original function candidate are
47044696 // defined in compatible type contexts. If the derivative function and the
@@ -5326,18 +5318,10 @@ void AttributeChecker::visitTransposeAttr(TransposeAttr *attr) {
53265318 // Returns true if the generic parameters in `source` satisfy the generic
53275319 // requirements in `target`.
53285320 std::function<bool (GenericSignature, GenericSignature)>
5329- checkGenericSignatureSatisfied = [&](GenericSignature source,
5330- GenericSignature target) {
5331- // If target is null, then its requirements are satisfied.
5332- if (!target)
5333- return true ;
5334- // If source is null but target is not null, then target's
5335- // requirements are not satisfied.
5336- if (!source)
5337- return false ;
5338-
5339- return target->requirementsNotSatisfiedBy (source).empty ();
5340- };
5321+ checkGenericSignatureSatisfied =
5322+ [&](GenericSignature source, GenericSignature target) {
5323+ return target.requirementsNotSatisfiedBy (source).empty ();
5324+ };
53415325
53425326 auto isValidOriginalCandidate = [&](AbstractFunctionDecl *originalCandidate)
53435327 -> Optional<AbstractFunctionDeclLookupErrorKind> {
0 commit comments