@@ -1489,6 +1489,13 @@ class Solution {
1489
1489
llvm::DenseMap<std::pair<const KeyPathExpr *, unsigned >, Type>
1490
1490
keyPathComponentTypes;
1491
1491
1492
+ // / The key path expression and its root type, value type, and decl context
1493
+ // / introduced by this solution.
1494
+ llvm::MapVector<const KeyPathExpr *,
1495
+ std::tuple</* root=*/ TypeVariableType *,
1496
+ /* value=*/ TypeVariableType *, DeclContext *>>
1497
+ KeyPaths;
1498
+
1492
1499
// / Contextual types introduced by this solution.
1493
1500
std::vector<std::pair<ASTNode, ContextualTypeInfo>> contextualTypes;
1494
1501
@@ -2154,6 +2161,12 @@ class ConstraintSystem {
2154
2161
std::tuple<const KeyPathExpr *, /* component index=*/ unsigned , Type>>
2155
2162
addedKeyPathComponentTypes;
2156
2163
2164
+ // / Maps a key path root, value, and decl context to the key path expression.
2165
+ llvm::MapVector<const KeyPathExpr *,
2166
+ std::tuple</* root=*/ TypeVariableType *,
2167
+ /* value=*/ TypeVariableType *, DeclContext *>>
2168
+ KeyPaths;
2169
+
2157
2170
// / Maps AST entries to their targets.
2158
2171
llvm::MapVector<SyntacticElementTargetKey, SyntacticElementTarget> targets;
2159
2172
@@ -2780,6 +2793,9 @@ class ConstraintSystem {
2780
2793
// / The length of \c ImplicitValueConversions.
2781
2794
unsigned numImplicitValueConversions;
2782
2795
2796
+ // / The length of \c KeyPaths.
2797
+ unsigned numKeyPaths;
2798
+
2783
2799
// / The length of \c ArgumentLists.
2784
2800
unsigned numArgumentLists;
2785
2801
0 commit comments