@@ -5786,12 +5786,10 @@ ConstraintSystem::simplifyBridgingConstraint(Type type1,
5786
5786
if (auto toKeyValue = isDictionaryType (unwrappedToType)) {
5787
5787
addExplicitConversionConstraint (fromKeyValue->first , toKeyValue->first ,
5788
5788
/* allowFixes=*/ false ,
5789
- /* addCoercionPathElt*/ false ,
5790
5789
locator.withPathElement (
5791
5790
LocatorPathElt::GenericArgument (0 )));
5792
5791
addExplicitConversionConstraint (fromKeyValue->second , toKeyValue->second ,
5793
5792
/* allowFixes=*/ false ,
5794
- /* addCoercionPathElt*/ false ,
5795
5793
locator.withPathElement (
5796
5794
LocatorPathElt::GenericArgument (0 )));
5797
5795
countOptionalInjections ();
@@ -7772,13 +7770,12 @@ void ConstraintSystem::addConstraint(ConstraintKind kind, Type first,
7772
7770
void ConstraintSystem::addExplicitConversionConstraint (
7773
7771
Type fromType, Type toType,
7774
7772
bool allowFixes,
7775
- bool addCoercionPathElt,
7776
7773
ConstraintLocatorBuilder locator) {
7777
7774
SmallVector<Constraint *, 3 > constraints;
7778
7775
7779
7776
auto locatorPtr = getConstraintLocator (locator);
7780
7777
auto coerceLocator = [&]() {
7781
- if (addCoercionPathElt && shouldAttemptFixes ()) {
7778
+ if (allowFixes && shouldAttemptFixes ()) {
7782
7779
if (auto *expr = dyn_cast_or_null<CoerceExpr>(locator.getAnchor ())) {
7783
7780
// Only adding this path for explicty coercions e.g _ = a as Int
7784
7781
// and also only for left-side is a DeclRefExpr or a
0 commit comments