@@ -1189,8 +1189,8 @@ namespace {
11891189 calleeFnTy = calleeFnTy->getResult ()->castTo <FunctionType>();
11901190 }
11911191
1192- const auto & appliedPropertyWrappers =
1193- solution.appliedPropertyWrappers [ locator.getAnchor ()] ;
1192+ auto appliedPropertyWrappers =
1193+ solution.getAppliedPropertyWrappers ( locator.getAnchor ()) ;
11941194 const auto calleeDeclRef = resolveConcreteDeclRef (
11951195 dyn_cast<AbstractFunctionDecl>(declOrClosure), locator);
11961196
@@ -2332,8 +2332,8 @@ namespace {
23322332 ->castTo <FunctionType>();
23332333 auto fullSubscriptTy = openedFullFnType->getResult ()
23342334 ->castTo <FunctionType>();
2335- auto & appliedWrappers =
2336- solution.appliedPropertyWrappers [ memberLoc->getAnchor ()] ;
2335+ auto appliedWrappers =
2336+ solution.getAppliedPropertyWrappers ( memberLoc->getAnchor ()) ;
23372337 args = coerceCallArguments (
23382338 args, fullSubscriptTy, subscriptRef, nullptr ,
23392339 locator.withPathElement (ConstraintLocator::ApplyArgument),
@@ -6328,6 +6328,7 @@ ArgumentList *ExprRewriter::coerceCallArguments(
63286328 auto *paramDecl = getParameterAt (callee, paramIdx);
63296329 assert (paramDecl);
63306330
6331+ ASSERT (appliedWrapperIndex < appliedPropertyWrappers.size ());
63316332 auto appliedWrapper = appliedPropertyWrappers[appliedWrapperIndex++];
63326333 auto wrapperType = solution.simplifyType (appliedWrapper.wrapperType );
63336334 auto initKind = appliedWrapper.initKind ;
@@ -8230,7 +8231,8 @@ Expr *ExprRewriter::finishApply(ApplyExpr *apply, Type openedType,
82308231 // Resolve into a DynamicTypeExpr.
82318232 auto args = apply->getArgs ();
82328233
8233- auto &appliedWrappers = solution.appliedPropertyWrappers [calleeLocator.getAnchor ()];
8234+ auto appliedWrappers = solution.getAppliedPropertyWrappers (
8235+ calleeLocator.getAnchor ());
82348236 auto fnType = cs.getType (fn)->getAs <FunctionType>();
82358237 args = coerceCallArguments (
82368238 args, fnType, declRef, apply,
@@ -8426,7 +8428,9 @@ Expr *ExprRewriter::finishApply(ApplyExpr *apply, Type openedType,
84268428 // For function application, convert the argument to the input type of
84278429 // the function.
84288430 if (auto fnType = cs.getType (fn)->getAs <FunctionType>()) {
8429- auto &appliedWrappers = solution.appliedPropertyWrappers [calleeLocator.getAnchor ()];
8431+ auto appliedWrappers = solution.getAppliedPropertyWrappers (
8432+ calleeLocator.getAnchor ());
8433+
84308434 args = coerceCallArguments (
84318435 args, fnType, callee, apply,
84328436 locator.withPathElement (ConstraintLocator::ApplyArgument),
0 commit comments