Skip to content

Commit 8abd831

Browse files
committed
When a or b is an error, relate ok
1 parent a0ebd5d commit 8abd831

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

chalk-solve/src/infer/unify.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ impl<'t, I: Interner> Unifier<'t, I> {
152152
}
153153
}
154154

155+
(TyKind::Error, _) | (_, TyKind::Error) => Ok(()),
156+
155157
// Unifying `forall<X> { T }` with some other forall type `forall<X> { U }`
156158
(&TyKind::Function(ref fn1), &TyKind::Function(ref fn2)) => {
157159
if fn1.sig == fn2.sig {
@@ -349,7 +351,6 @@ impl<'t, I: Interner> Unifier<'t, I> {
349351
(TyKind::Foreign(id_a), TyKind::Foreign(id_b)) => {
350352
Zip::zip_with(self, variance, id_a, id_b)
351353
}
352-
(TyKind::Error, TyKind::Error) => Ok(()),
353354

354355
(_, _) => Err(NoSolution),
355356
}

0 commit comments

Comments
 (0)