Improve error reporting for patterns not matching opaques

This commit is contained in:
ayazhafiz 2022-02-24 23:37:33 -05:00
parent 4e27cdd21d
commit 07b1829732
7 changed files with 26 additions and 23 deletions

View file

@ -357,7 +357,7 @@ fn unify_alias(
Error => merge(subs, ctx, Error),
other => {
// The type on the left is an alias, but the one on the right is not!
debug_assert!(kind != AliasKind::Opaque);
debug_assert!(either_is_opaque);
mismatch!("Cannot unify opaque {:?} with {:?}", symbol, other)
}
}