@@ -3407,7 +3407,7 @@ ConstraintSystem::matchExistentialTypes(Type type1, Type type2,
3407
3407
3408
3408
if (last.is<LocatorPathElt::ApplyArgToParam>()) {
3409
3409
auto *fix = AllowArgumentMismatch::create(
3410
- *this, type1, proto, getConstraintLocator(locator ));
3410
+ *this, type1, proto, getConstraintLocator(anchor, path ));
3411
3411
3412
3412
// Impact is 2 here because there are two failures
3413
3413
// 1 - missing conformance and 2 - incorrect argument type.
@@ -3443,14 +3443,14 @@ ConstraintSystem::matchExistentialTypes(Type type1, Type type2,
3443
3443
3444
3444
if (isExpr<CoerceExpr>(anchor)) {
3445
3445
auto *fix = ContextualMismatch::create(
3446
- *this, type1, type2, getConstraintLocator(locator ));
3446
+ *this, type1, type2, getConstraintLocator(anchor, path ));
3447
3447
if (recordFix(fix))
3448
3448
return getTypeMatchFailure(locator);
3449
3449
break;
3450
3450
}
3451
3451
3452
3452
auto *fix = MissingConformance::forContextual(
3453
- *this, type1, proto, getConstraintLocator(locator ));
3453
+ *this, type1, proto, getConstraintLocator(anchor, path ));
3454
3454
3455
3455
if (recordFix(fix))
3456
3456
return getTypeMatchFailure(locator);
0 commit comments