@@ -1189,8 +1189,8 @@ namespace {
1189
1189
calleeFnTy = calleeFnTy->getResult ()->castTo <FunctionType>();
1190
1190
}
1191
1191
1192
- const auto & appliedPropertyWrappers =
1193
- solution.appliedPropertyWrappers [ locator.getAnchor ()] ;
1192
+ auto appliedPropertyWrappers =
1193
+ solution.getAppliedPropertyWrappers ( locator.getAnchor ()) ;
1194
1194
const auto calleeDeclRef = resolveConcreteDeclRef (
1195
1195
dyn_cast<AbstractFunctionDecl>(declOrClosure), locator);
1196
1196
@@ -2332,8 +2332,8 @@ namespace {
2332
2332
->castTo <FunctionType>();
2333
2333
auto fullSubscriptTy = openedFullFnType->getResult ()
2334
2334
->castTo <FunctionType>();
2335
- auto & appliedWrappers =
2336
- solution.appliedPropertyWrappers [ memberLoc->getAnchor ()] ;
2335
+ auto appliedWrappers =
2336
+ solution.getAppliedPropertyWrappers ( memberLoc->getAnchor ()) ;
2337
2337
args = coerceCallArguments (
2338
2338
args, fullSubscriptTy, subscriptRef, nullptr ,
2339
2339
locator.withPathElement (ConstraintLocator::ApplyArgument),
@@ -6328,6 +6328,7 @@ ArgumentList *ExprRewriter::coerceCallArguments(
6328
6328
auto *paramDecl = getParameterAt (callee, paramIdx);
6329
6329
assert (paramDecl);
6330
6330
6331
+ ASSERT (appliedWrapperIndex < appliedPropertyWrappers.size ());
6331
6332
auto appliedWrapper = appliedPropertyWrappers[appliedWrapperIndex++];
6332
6333
auto wrapperType = solution.simplifyType (appliedWrapper.wrapperType );
6333
6334
auto initKind = appliedWrapper.initKind ;
@@ -8230,7 +8231,8 @@ Expr *ExprRewriter::finishApply(ApplyExpr *apply, Type openedType,
8230
8231
// Resolve into a DynamicTypeExpr.
8231
8232
auto args = apply->getArgs ();
8232
8233
8233
- auto &appliedWrappers = solution.appliedPropertyWrappers [calleeLocator.getAnchor ()];
8234
+ auto appliedWrappers = solution.getAppliedPropertyWrappers (
8235
+ calleeLocator.getAnchor ());
8234
8236
auto fnType = cs.getType (fn)->getAs <FunctionType>();
8235
8237
args = coerceCallArguments (
8236
8238
args, fnType, declRef, apply,
@@ -8426,7 +8428,9 @@ Expr *ExprRewriter::finishApply(ApplyExpr *apply, Type openedType,
8426
8428
// For function application, convert the argument to the input type of
8427
8429
// the function.
8428
8430
if (auto fnType = cs.getType (fn)->getAs <FunctionType>()) {
8429
- auto &appliedWrappers = solution.appliedPropertyWrappers [calleeLocator.getAnchor ()];
8431
+ auto appliedWrappers = solution.getAppliedPropertyWrappers (
8432
+ calleeLocator.getAnchor ());
8433
+
8430
8434
args = coerceCallArguments (
8431
8435
args, fnType, callee, apply,
8432
8436
locator.withPathElement (ConstraintLocator::ApplyArgument),
0 commit comments