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:
Joe Groff
2018-09-18 19:05:41 -07:00
parent 86e11c594f
commit 93b5de61e7
21 changed files with 115 additions and 110 deletions

View File

@@ -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: