Fix bug in match arm type unification
This commit is contained in:
committed by
Aleksey Kladov
parent
44e9a9605b
commit
5027c5d4ee
@@ -1143,7 +1143,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
|
||||
ret_ty
|
||||
}
|
||||
Expr::Match { expr, arms } => {
|
||||
let mut expected = Expectation::none();
|
||||
let mut expected = expected.clone();
|
||||
let input_ty = self.infer_expr(*expr, &Expectation::none());
|
||||
let pat_expectation = Expectation::has_type(input_ty);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user