@@ -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
@@ -2319,8 +2319,8 @@ namespace {
23192319 ->castTo <FunctionType>();
23202320 auto fullSubscriptTy = openedFullFnType->getResult ()
23212321 ->castTo <FunctionType>();
2322- auto & appliedWrappers =
2323- solution.appliedPropertyWrappers [ memberLoc->getAnchor ()] ;
2322+ auto appliedWrappers =
2323+ solution.getAppliedPropertyWrappers ( memberLoc->getAnchor ()) ;
23242324 args = coerceCallArguments (
23252325 args, fullSubscriptTy, subscriptRef, nullptr ,
23262326 locator.withPathElement (ConstraintLocator::ApplyArgument),
@@ -6286,6 +6286,7 @@ ArgumentList *ExprRewriter::coerceCallArguments(
62866286 auto *paramDecl = getParameterAt (callee, paramIdx);
62876287 assert (paramDecl);
62886288
6289+ ASSERT (appliedWrapperIndex < appliedPropertyWrappers.size ());
62896290 auto appliedWrapper = appliedPropertyWrappers[appliedWrapperIndex++];
62906291 auto wrapperType = solution.simplifyType (appliedWrapper.wrapperType );
62916292 auto initKind = appliedWrapper.initKind ;
@@ -8179,7 +8180,8 @@ Expr *ExprRewriter::finishApply(ApplyExpr *apply, Type openedType,
81798180 // Resolve into a DynamicTypeExpr.
81808181 auto args = apply->getArgs ();
81818182
8182- auto &appliedWrappers = solution.appliedPropertyWrappers [calleeLocator.getAnchor ()];
8183+ auto appliedWrappers = solution.getAppliedPropertyWrappers (
8184+ calleeLocator.getAnchor ());
81838185 auto fnType = cs.getType (fn)->getAs <FunctionType>();
81848186 args = coerceCallArguments (
81858187 args, fnType, declRef, apply,
@@ -8375,7 +8377,9 @@ Expr *ExprRewriter::finishApply(ApplyExpr *apply, Type openedType,
83758377 // For function application, convert the argument to the input type of
83768378 // the function.
83778379 if (auto fnType = cs.getType (fn)->getAs <FunctionType>()) {
8378- auto &appliedWrappers = solution.appliedPropertyWrappers [calleeLocator.getAnchor ()];
8380+ auto appliedWrappers = solution.getAppliedPropertyWrappers (
8381+ calleeLocator.getAnchor ());
8382+
83798383 args = coerceCallArguments (
83808384 args, fnType, callee, apply,
83818385 locator.withPathElement (ConstraintLocator::ApplyArgument),
0 commit comments