Fix a bunch of tests

This commit is contained in:
Richard Feldman 2024-09-28 22:22:28 -04:00
parent 3f3ee26504
commit 83b723f221
No known key found for this signature in database
GPG key ID: 5DE4EE30BB738EDF
2 changed files with 175 additions and 400 deletions

View file

@ -157,10 +157,10 @@ fn lower_content(
let mut tags = resolve_tag_ext(subs, problems, UnionTags::default(), *ext);
// Now lower all the tags we gathered from the ext var.
// Do this in a separate pass to avoid borrow errors on Subs.
// (Do this in a separate pass to avoid borrow errors on Subs.)
lower_vars(tags.iter_mut().flat_map(|(_, vars)| vars.iter_mut()), cache, subs, problems);
// Then, add the tag names with no payloads. (There's nothing to lower here.)
// Then, add the tag names with no payloads. (There are no variables to lower here.)
for index in tag_names.into_iter() {
tags.push(((&subs[index]).clone(), Vec::new()));
}
@ -287,9 +287,6 @@ fn resolve_record_ext(
}
}
// ext should have ended up being empty
debug_assert_eq!(ext, Variable::EMPTY_RECORD);
all_fields
}
@ -331,9 +328,6 @@ fn resolve_tuple_ext(
}
}
// ext should have ended up being empty
debug_assert_eq!(ext, Variable::EMPTY_TUPLE);
all_elems
}