fix infinite unfolding of recursive tag union

This commit is contained in:
Folkert 2020-06-30 10:53:00 +02:00
parent b4480e212a
commit 5483ec819f
3 changed files with 56 additions and 25 deletions

View file

@ -1929,6 +1929,8 @@ fn aliases_to_attr_type(var_store: &mut VarStore, aliases: &mut SendMap<Symbol,
_ => unreachable!("`annotation_to_attr_type` always gives back an Attr"),
}
// TODO can we "just" fix this in alias instantiation?
// e.g. does this work for a triple-mutually-recursive alias?
if let Some(b) = &alias.uniqueness {
fix_mutual_recursive_alias(&mut alias.typ, b);
}