Simply choosing of the matching variable

This commit is contained in:
Ayaz Hafiz 2022-06-01 11:29:14 -05:00
parent 2c62f9b5ba
commit c827349ae2
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58

View file

@ -882,14 +882,7 @@ fn unify_lambda_set_help(
let outcome = unify_pool(subs, pool, var1, var2, ctx.mode);
// TODO: i think we can get rid of this
// clearly, this is very suspicious: these variables have just been unified. And yet,
// not doing this leads to stack overflows
if rec2.is_some() {
if outcome.mismatches.is_empty() {
matching_vars.push(var2);
}
} else if outcome.mismatches.is_empty() {
if outcome.mismatches.is_empty() {
matching_vars.push(var1);
}
}