mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[ConstraintLocator] Add information about expected value type to key path locator
Record a "value" type associated with this location to be able to reference during inference.
This commit is contained in:
@@ -122,7 +122,7 @@ bool ConstraintLocator::isKeyPathType() const {
|
||||
// The format of locator should be `<keypath expr> -> key path type`
|
||||
if (!anchor || !isExpr<KeyPathExpr>(anchor) || path.size() != 1)
|
||||
return false;
|
||||
return path.back().getKind() == ConstraintLocator::KeyPathType;
|
||||
return path.back().is<LocatorPathElt::KeyPathType>();
|
||||
}
|
||||
|
||||
bool ConstraintLocator::isKeyPathRoot() const {
|
||||
|
||||
Reference in New Issue
Block a user