@@ -468,7 +468,7 @@ class ExprVisitor : public AstVisitorBase<ExprVisitor> {
468468 auto pathLabel = dispatcher_.fetchLabel (path);
469469 dispatcher_.emit (KeyPathExprParsedPathsTrap{label, pathLabel});
470470 }
471- if (auto root = expr->getParsedPath ()) {
471+ if (auto root = expr->getParsedRoot ()) {
472472 auto rootLabel = dispatcher_.fetchLabel (root);
473473 dispatcher_.emit (KeyPathExprParsedRootsTrap{label, rootLabel});
474474 }
@@ -509,6 +509,22 @@ class ExprVisitor : public AstVisitorBase<ExprVisitor> {
509509 dispatcher_.emit (IfExprsTrap{label, condLabel, thenLabel, elseLabel});
510510 }
511511
512+ void visitKeyPathDotExpr (swift::KeyPathDotExpr* expr) {
513+ auto label = dispatcher_.assignNewLabel (expr);
514+ dispatcher_.emit (KeyPathDotExprsTrap{label});
515+ }
516+
517+ void visitKeyPathApplicationExpr (swift::KeyPathApplicationExpr* expr) {
518+ auto label = dispatcher_.assignNewLabel (expr);
519+ assert (expr->getBase () && " KeyPathApplicationExpr has getBase()" );
520+ assert (expr->getKeyPath () && " KeyPathApplicationExpr has getKeyPath()" );
521+
522+ auto baseLabel = dispatcher_.fetchLabel (expr->getBase ());
523+ auto keyPathLabel = dispatcher_.fetchLabel (expr->getKeyPath ());
524+
525+ dispatcher_.emit (KeyPathApplicationExprsTrap{label, baseLabel, keyPathLabel});
526+ }
527+
512528 private:
513529 TrapLabel<ArgumentTag> emitArgument (const swift::Argument& arg) {
514530 auto argLabel = dispatcher_.createLabel <ArgumentTag>();
0 commit comments