@@ -1190,8 +1190,8 @@ namespace {
11901190 calleeFnTy = calleeFnTy->getResult ()->castTo <FunctionType>();
11911191 }
11921192
1193- const auto & appliedPropertyWrappers =
1194- solution.appliedPropertyWrappers [ locator.getAnchor ()] ;
1193+ auto appliedPropertyWrappers =
1194+ solution.getAppliedPropertyWrappers ( locator.getAnchor ()) ;
11951195 const auto calleeDeclRef = resolveConcreteDeclRef (
11961196 dyn_cast<AbstractFunctionDecl>(declOrClosure), locator);
11971197
@@ -2328,8 +2328,8 @@ namespace {
23282328 ->castTo <FunctionType>();
23292329 auto fullSubscriptTy = openedFullFnType->getResult ()
23302330 ->castTo <FunctionType>();
2331- auto & appliedWrappers =
2332- solution.appliedPropertyWrappers [ memberLoc->getAnchor ()] ;
2331+ auto appliedWrappers =
2332+ solution.getAppliedPropertyWrappers ( memberLoc->getAnchor ()) ;
23332333 args = coerceCallArguments (
23342334 args, fullSubscriptTy, subscriptRef, nullptr ,
23352335 locator.withPathElement (ConstraintLocator::ApplyArgument),
@@ -6290,6 +6290,7 @@ ArgumentList *ExprRewriter::coerceCallArguments(
62906290 auto *paramDecl = getParameterAt (callee, paramIdx);
62916291 assert (paramDecl);
62926292
6293+ ASSERT (appliedWrapperIndex < appliedPropertyWrappers.size ());
62936294 auto appliedWrapper = appliedPropertyWrappers[appliedWrapperIndex++];
62946295 auto wrapperType = solution.simplifyType (appliedWrapper.wrapperType );
62956296 auto initKind = appliedWrapper.initKind ;
@@ -8195,7 +8196,8 @@ Expr *ExprRewriter::finishApply(ApplyExpr *apply, Type openedType,
81958196 // Resolve into a DynamicTypeExpr.
81968197 auto args = apply->getArgs ();
81978198
8198- auto &appliedWrappers = solution.appliedPropertyWrappers [calleeLocator.getAnchor ()];
8199+ auto appliedWrappers = solution.getAppliedPropertyWrappers (
8200+ calleeLocator.getAnchor ());
81998201 auto fnType = cs.getType (fn)->getAs <FunctionType>();
82008202 args = coerceCallArguments (
82018203 args, fnType, declRef, apply,
@@ -8391,7 +8393,9 @@ Expr *ExprRewriter::finishApply(ApplyExpr *apply, Type openedType,
83918393 // For function application, convert the argument to the input type of
83928394 // the function.
83938395 if (auto fnType = cs.getType (fn)->getAs <FunctionType>()) {
8394- auto &appliedWrappers = solution.appliedPropertyWrappers [calleeLocator.getAnchor ()];
8396+ auto appliedWrappers = solution.getAppliedPropertyWrappers (
8397+ calleeLocator.getAnchor ());
8398+
83958399 args = coerceCallArguments (
83968400 args, fnType, callee, apply,
83978401 locator.withPathElement (ConstraintLocator::ApplyArgument),
0 commit comments