[CSDiagnostics] Differentiate between key path type and value issues

Make sure that contextual mismatch uses a correct locator when
the issue is with key path value type instead of the key path
type.
This commit is contained in:
Pavel Yaskevich
2023-10-24 13:31:04 -07:00
parent bfeade4e39
commit 8b4985054a
6 changed files with 20 additions and 11 deletions

View File

@@ -6693,7 +6693,8 @@ bool ConstraintSystem::repairFailures(
}
conversionsOrFixes.push_back(IgnoreContextualType::create(
*this, lhs, rhs, keyPathLoc));
*this, lhs, rhs,
getConstraintLocator(keyPathLoc, ConstraintLocator::KeyPathValue)));
break;
}
default: