Commit 0c75593
committed
[CSBindings] Fix inference of partial key path from conversion constraints
It's not permitted to use `PartialKeyPath` type to resolve a key path
expression, because that type is intended to be a type-erased version of
a fully resolved `KeyPath` type.
In situations where contextual type is a partial key path (e.g. parameter
type is a partial key path), let's replace it with a `KeyPath` type that
is a subtype of `PartialKeyPath` and allow value inference to happen.
Resolves: SR-5667
Resolves: rdar://323651831 parent 9ab7702 commit 0c75593
File tree
2 files changed
+28
-11
lines changed- lib/Sema
- test/expr/unary/keypath
2 files changed
+28
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1111 | 1111 | | |
1112 | 1112 | | |
1113 | 1113 | | |
1114 | | - | |
1115 | | - | |
1116 | | - | |
1117 | | - | |
1118 | | - | |
1119 | | - | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
1120 | 1139 | | |
| 1140 | + | |
1121 | 1141 | | |
| 1142 | + | |
1122 | 1143 | | |
1123 | 1144 | | |
1124 | 1145 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
184 | | - | |
185 | | - | |
| 183 | + | |
186 | 184 | | |
187 | 185 | | |
188 | 186 | | |
189 | | - | |
190 | | - | |
191 | 187 | | |
192 | 188 | | |
193 | 189 | | |
| |||
0 commit comments