Fix unifying pure with flex vars

This commit is contained in:
Agus Zubiaga 2024-10-22 00:07:45 -03:00
parent 6533e9084d
commit 89a918cebe
No known key found for this signature in database
12 changed files with 230 additions and 154 deletions

View file

@ -1149,9 +1149,8 @@ fn unify_erased_lambda<M: MetaCollector>(
#[must_use]
fn unify_pure<M: MetaCollector>(env: &mut Env, ctx: &Context, other: &Content) -> Outcome<M> {
match other {
Pure => merge(env, ctx, Pure),
Pure | FlexVar(_) => merge(env, ctx, Pure),
Effectful => merge(env, ctx, Effectful),
FlexVar(_) => merge(env, ctx, *other),
RigidVar(_)
| FlexAbleVar(_, _)
| RigidAbleVar(_, _)