Make sure flex unifies with rigid-able vars correctly

This commit is contained in:
Ayaz Hafiz 2022-10-04 13:17:12 -05:00
parent 715d88510c
commit 294244ae25
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58

View file

@ -2820,7 +2820,7 @@ fn unify_rigid_able<M: MetaCollector>(
match other {
FlexVar(_) => {
// If the other is flex, rigid wins!
merge(env, ctx, RigidVar(*name))
merge(env, ctx, RigidAbleVar(*name, ability))
}
FlexAbleVar(_, other_ability) => {
if ability == *other_ability {