diff options
Diffstat (limited to 'crates/hir_ty/src/infer.rs')
-rw-r--r-- | crates/hir_ty/src/infer.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/hir_ty/src/infer.rs b/crates/hir_ty/src/infer.rs index 603068ab5..f3cccca68 100644 --- a/crates/hir_ty/src/infer.rs +++ b/crates/hir_ty/src/infer.rs | |||
@@ -395,6 +395,10 @@ impl<'a> InferenceContext<'a> { | |||
395 | } | 395 | } |
396 | 396 | ||
397 | fn unify(&mut self, ty1: &Ty, ty2: &Ty) -> bool { | 397 | fn unify(&mut self, ty1: &Ty, ty2: &Ty) -> bool { |
398 | // TODO handle expectations properly | ||
399 | if ty2.is_unknown() { | ||
400 | return true; | ||
401 | } | ||
398 | self.table.unify(ty1, ty2) | 402 | self.table.unify(ty1, ty2) |
399 | } | 403 | } |
400 | 404 | ||