This commit is contained in:
Folkert 2021-08-11 22:04:43 +02:00
parent 1d32be0818
commit 0643efa571
5 changed files with 21 additions and 26 deletions

View file

@ -446,7 +446,7 @@ fn write_sorted_tags<'a>(
// If the `ext` contains tags, merge them into the list of tags.
// this can occur when inferring mutually recursive tags
let mut from_ext = Default::default();
let ext_content = chase_ext_tag_union(subs, ext_var, &mut from_ext);
let _ext_content = chase_ext_tag_union(subs, ext_var, &mut from_ext);
for (tag_name, arguments) in from_ext.iter() {
sorted_fields.push((tag_name, arguments));

View file

@ -1119,7 +1119,7 @@ pub fn is_empty_tag_union(subs: &Subs, mut var: Variable) -> bool {
var = *actual_var;
}
other => {
_other => {
return false;
}
}
@ -1454,7 +1454,7 @@ fn explicit_substitute(
Structure(Func(arg_vars, new_closure_var, new_ret_var)),
);
}
TagUnion(mut tags, ext_var) => {
TagUnion(tags, ext_var) => {
let new_ext_var = explicit_substitute(subs, from, to, ext_var, seen);
let mut new_slices = Vec::new();

View file

@ -1617,16 +1617,16 @@ pub fn gather_tags_unsorted_iter(
var = *sub_ext;
}
Structure(FunctionOrTagUnion(tag_name_index, _, sub_ext)) => {
todo!()
Structure(FunctionOrTagUnion(_tag_name_index, _, _sub_ext)) => {
todo!("this variant does not use SOA yet, and therefore this case is unreachable right now")
// let sub_fields: UnionTags = (*tag_name_index).into();
// stack.push(sub_fields);
//
// var = *sub_ext;
}
Structure(RecursiveTagUnion(_, sub_fields, sub_ext)) => {
todo!()
Structure(RecursiveTagUnion(_, _sub_fields, _sub_ext)) => {
todo!("this variant does not use SOA yet, and therefore this case is unreachable right now")
// stack.push(*sub_fields);
//
// var = *sub_ext;