Commit 2b2f780
committed
Fix solution application for keypath function subtype conversions
In #39612 we added subtyping for keypaths-as-functions, but during application
the implementation naively coerced the keypath expression itself to the
inferred supertype, resulting in erroneous results. This patch updates the
solution application logic to build the keypath-function conversion expression
based entirely on the 'natural' keypath type, only converting to the inferred
supertype at the end via the usual coerceToType machinery for function
conversions.1 parent d35dcc8 commit 2b2f780
2 files changed
+33
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5117 | 5117 | | |
5118 | 5118 | | |
5119 | 5119 | | |
5120 | | - | |
| 5120 | + | |
5121 | 5121 | | |
5122 | 5122 | | |
5123 | 5123 | | |
| |||
5133 | 5133 | | |
5134 | 5134 | | |
5135 | 5135 | | |
5136 | | - | |
5137 | | - | |
| 5136 | + | |
| 5137 | + | |
| 5138 | + | |
| 5139 | + | |
| 5140 | + | |
| 5141 | + | |
| 5142 | + | |
| 5143 | + | |
| 5144 | + | |
| 5145 | + | |
| 5146 | + | |
| 5147 | + | |
5138 | 5148 | | |
5139 | 5149 | | |
5140 | 5150 | | |
5141 | 5151 | | |
5142 | | - | |
| 5152 | + | |
5143 | 5153 | | |
5144 | 5154 | | |
5145 | 5155 | | |
| |||
5154 | 5164 | | |
5155 | 5165 | | |
5156 | 5166 | | |
5157 | | - | |
| 5167 | + | |
| 5168 | + | |
5158 | 5169 | | |
5159 | | - | |
| 5170 | + | |
5160 | 5171 | | |
5161 | 5172 | | |
5162 | 5173 | | |
| |||
5208 | 5219 | | |
5209 | 5220 | | |
5210 | 5221 | | |
5211 | | - | |
| 5222 | + | |
5212 | 5223 | | |
5213 | 5224 | | |
5214 | 5225 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
637 | 637 | | |
638 | 638 | | |
639 | 639 | | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
0 commit comments