Closed
Description
Right now, infer does not track which value (the sub vs super type) is the "expected" one---that is, it does not track which value came from the user and which did not. This basically requires an extra boolean to be passed around. This leads to confusing error messages such as #2721.