You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tune usage of resultConforms to prefer the chosen alternative
`resultConforms` should only make us change our mind when we're sure that the
chosen alternative does not fit the result type but another alternative would.
The problem is that due to approximations and adaptation, we can guess wrong on
both counts.
In i22713 in particular, we guessed that the chosen alternative does not
work (but it does because of Unit insertion) and that another alternative would,
but it doesn't because `resultConforms` prefers false positives to false
negatives (the result type is under-approximated to `Nothing` which is
indeed a subtype of `Unit`).
We only really need to prefer false positives to false negatives when
considering whether to discard the currently chosen alternative (because there's
probably a good reason we chose it in the first place), so this commit
introduces a parameter to `resultConforms` to control this.
Fixes#22713.
0 commit comments