@@ -619,15 +619,15 @@ bool TypeChecker::diagnoseInvalidFunctionType(FunctionType *fnTy, SourceLoc loc,
619619 dc, stage);
620620 }) != params.end ();
621621 bool alreadyDiagnosedOneParam = false ;
622- bool hasInoutDifferentiableParameter = false ;
622+ bool hasDifferentiableInoutParameter = false ;
623623 for (unsigned i = 0 , end = fnTy->getNumParams (); i != end; ++i) {
624624 auto param = params[i];
625625 if (param.isNoDerivative ())
626626 continue ;
627627 auto paramType = param.getPlainType ();
628628 if (TypeChecker::isDifferentiable (paramType, isLinear, dc, stage)) {
629629 if (param.isInOut ())
630- hasInoutDifferentiableParameter = true ;
630+ hasDifferentiableInoutParameter = true ;
631631 continue ;
632632 }
633633 auto diagLoc =
@@ -663,7 +663,7 @@ bool TypeChecker::diagnoseInvalidFunctionType(FunctionType *fnTy, SourceLoc loc,
663663 bool differentiableResultExists = resultExists && resultIsDifferentiable;
664664
665665 // Reject the case where there are multiple semantic results.
666- if (differentiableResultExists && hasInoutDifferentiableParameter ) {
666+ if (differentiableResultExists && hasDifferentiableInoutParameter ) {
667667 auto diagLoc = repr ? (*repr)->getArgsTypeRepr ()->getLoc () : loc;
668668 auto diag = ctx.Diags .diagnose (
669669 diagLoc,
@@ -676,7 +676,7 @@ bool TypeChecker::diagnoseInvalidFunctionType(FunctionType *fnTy, SourceLoc loc,
676676 }
677677
678678 // Reject the case where the semantic result is not differentiable.
679- if (!resultIsDifferentiable && !hasInoutDifferentiableParameter ) {
679+ if (!resultIsDifferentiable && !hasDifferentiableInoutParameter ) {
680680 auto diagLoc = repr ? (*repr)->getResultTypeRepr ()->getLoc () : loc;
681681 auto resultStr = fnTy->getResult ()->getString ();
682682 auto diag = ctx.Diags .diagnose (
@@ -690,7 +690,7 @@ bool TypeChecker::diagnoseInvalidFunctionType(FunctionType *fnTy, SourceLoc loc,
690690 }
691691
692692 // Reject the case where there are no semantic results.
693- if (!resultExists && !hasInoutDifferentiableParameter ) {
693+ if (!resultExists && !hasDifferentiableInoutParameter ) {
694694 auto diagLoc = repr ? (*repr)->getResultTypeRepr ()->getLoc () : loc;
695695 auto diag = ctx.Diags .diagnose (
696696 diagLoc, diag::differentiable_function_type_no_differentiable_result,
0 commit comments