Fix bug in match arm type unification
This commit is contained in:
parent
44e9a9605b
commit
5027c5d4ee
@ -1143,7 +1143,7 @@ fn infer_expr(&mut self, expr: ExprId, expected: &Expectation) -> Ty {
|
||||
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user