Skip to content

Commit 90edbe4

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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

chalk-solve/src/infer/unify.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ impl<'t, I: Interner> Unifier<'t, I> {
111111
}
112112

113113
match (a.kind(interner), b.kind(interner)) {
114+
(TyKind::Error, _) | (_, TyKind::Error) => Ok(()),
114115
// Relating two inference variables:
115116
// First, if either variable is a float or int kind, then we always
116117
// unify if they match. This is because float and ints don't have
@@ -349,7 +350,6 @@ impl<'t, I: Interner> Unifier<'t, I> {
349350
(TyKind::Foreign(id_a), TyKind::Foreign(id_b)) => {
350351
Zip::zip_with(self, variance, id_a, id_b)
351352
}
352-
(TyKind::Error, TyKind::Error) => Ok(()),
353353

354354
(_, _) => Err(NoSolution),
355355
}

0 commit comments

Comments
 (0)