Commit 65e83a8
committed
[CSSimplify] Increase impact of a generic argument mismatch if mismatch is contextual
If generic arguments mismatch ends up being recorded on the result
of the chain or `try` expression it means that there is a contextual
conversion mismatch.
For optional conversions the solver currently generates a disjunction
with two choices - bind and optional-to-optional conversion which is
anchored on the contextual expression. If we can get a fix recorded
there that would result in a better diagnostic. It's only possible
for optional-to-optional choice because it doesn't bind the
variable immediately, so we need to downgrade direct fixes to prevent
`bind` choice from considered better.1 parent 71a8d8d commit 65e83a8
2 files changed
+21
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
560 | 560 | | |
561 | 561 | | |
562 | 562 | | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
563 | 568 | | |
564 | 569 | | |
565 | 570 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15696 | 15696 | | |
15697 | 15697 | | |
15698 | 15698 | | |
| 15699 | + | |
| 15700 | + | |
| 15701 | + | |
| 15702 | + | |
| 15703 | + | |
| 15704 | + | |
| 15705 | + | |
| 15706 | + | |
| 15707 | + | |
| 15708 | + | |
| 15709 | + | |
| 15710 | + | |
| 15711 | + | |
| 15712 | + | |
| 15713 | + | |
| 15714 | + | |
15699 | 15715 | | |
15700 | 15716 | | |
15701 | 15717 | | |
| |||
0 commit comments