mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Implement the final approved syntax for SE-227 identity key paths.
`\.self` is the final chosen syntax. Implement support for this syntax, and remove the stopgap builtin and `WritableKeyPath._identity` property that were in place before.
This commit is contained in:
@@ -638,6 +638,7 @@ getCalleeDeclAndArgs(ConstraintSystem &cs,
|
||||
case KeyPathExpr::Component::Kind::OptionalForce:
|
||||
case KeyPathExpr::Component::Kind::OptionalChain:
|
||||
case KeyPathExpr::Component::Kind::OptionalWrap:
|
||||
case KeyPathExpr::Component::Kind::Identity:
|
||||
return std::make_tuple(nullptr, 0, argLabels, hasTrailingClosure);
|
||||
}
|
||||
|
||||
@@ -4137,6 +4138,7 @@ ConstraintSystem::simplifyKeyPathConstraint(Type keyPathTy,
|
||||
|
||||
switch (component.getKind()) {
|
||||
case KeyPathExpr::Component::Kind::Invalid:
|
||||
case KeyPathExpr::Component::Kind::Identity:
|
||||
break;
|
||||
|
||||
case KeyPathExpr::Component::Kind::Property:
|
||||
|
||||
Reference in New Issue
Block a user