[CSGen] Record keypath for use across constraint system.

This commit is contained in:
Amritpan Kaur
2023-07-03 14:00:59 -07:00
parent dab7dbfdfd
commit 1d8e7ef2fe
3 changed files with 17 additions and 4 deletions

View File

@@ -14536,6 +14536,12 @@ void ConstraintSystem::recordCallAsFunction(UnresolvedDotExpr *root,
getConstraintLocator(root, ConstraintLocator::ApplyArgument), arguments);
}
void ConstraintSystem::recordKeyPath(KeyPathExpr *keypath,
TypeVariableType *root,
TypeVariableType *value, DeclContext *dc) {
KeyPaths.insert(std::make_pair(keypath, std::make_tuple(root, value, dc)));
}
ConstraintSystem::SolutionKind ConstraintSystem::simplifyFixConstraint(
ConstraintFix *fix, Type type1, Type type2, ConstraintKind matchKind,
TypeMatchOptions flags, ConstraintLocatorBuilder locator) {