@@ -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
@@ -2334,8 +2334,8 @@ namespace {
23342334 ->castTo <FunctionType>();
23352335 auto fullSubscriptTy = openedFullFnType->getResult ()
23362336 ->castTo <FunctionType>();
2337- auto & appliedWrappers =
2338- solution.appliedPropertyWrappers [ memberLoc->getAnchor ()] ;
2337+ auto appliedWrappers =
2338+ solution.getAppliedPropertyWrappers ( memberLoc->getAnchor ()) ;
23392339 args = coerceCallArguments (
23402340 args, fullSubscriptTy, subscriptRef, nullptr ,
23412341 locator.withPathElement (ConstraintLocator::ApplyArgument),
@@ -6338,6 +6338,7 @@ ArgumentList *ExprRewriter::coerceCallArguments(
63386338 auto *paramDecl = getParameterAt (callee, paramIdx);
63396339 assert (paramDecl);
63406340
6341+ ASSERT (appliedWrapperIndex < appliedPropertyWrappers.size ());
63416342 auto appliedWrapper = appliedPropertyWrappers[appliedWrapperIndex++];
63426343 auto wrapperType = solution.simplifyType (appliedWrapper.wrapperType );
63436344 auto initKind = appliedWrapper.initKind ;
@@ -8240,7 +8241,8 @@ Expr *ExprRewriter::finishApply(ApplyExpr *apply, Type openedType,
82408241 // Resolve into a DynamicTypeExpr.
82418242 auto args = apply->getArgs ();
82428243
8243- auto &appliedWrappers = solution.appliedPropertyWrappers [calleeLocator.getAnchor ()];
8244+ auto appliedWrappers = solution.getAppliedPropertyWrappers (
8245+ calleeLocator.getAnchor ());
82448246 auto fnType = cs.getType (fn)->getAs <FunctionType>();
82458247 args = coerceCallArguments (
82468248 args, fnType, declRef, apply,
@@ -8436,7 +8438,9 @@ Expr *ExprRewriter::finishApply(ApplyExpr *apply, Type openedType,
84368438 // For function application, convert the argument to the input type of
84378439 // the function.
84388440 if (auto fnType = cs.getType (fn)->getAs <FunctionType>()) {
8439- auto &appliedWrappers = solution.appliedPropertyWrappers [calleeLocator.getAnchor ()];
8441+ auto appliedWrappers = solution.getAppliedPropertyWrappers (
8442+ calleeLocator.getAnchor ());
8443+
84408444 args = coerceCallArguments (
84418445 args, fnType, callee, apply,
84428446 locator.withPathElement (ConstraintLocator::ApplyArgument),
0 commit comments