07f6efc4e7
fix: disregard type variable expectation for if expressions
Fixes #13522
As [the comment](8142d1f606/crates/hir-ty/src/infer.rs (L1087-L1090)
) on `Expectation::adjust_for_branches` explains:
> If the expected type is just a type variable, then don't use an expected type. Otherwise, we might write parts of the type when checking the 'then' block which are incompatible with the 'else' branch.
Note that we already use it in match expressions. I've added tests for them too nevertheless.