mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-22 16:30:04 +03:00
Only recursive tag unions are relevant in illegal cycles
This commit is contained in:
parent
b8defcbc75
commit
e946b972f7
@ -1628,7 +1628,7 @@ fn correct_mutual_recursive_type_alias<'a>(
|
||||
// because we need all the types to be deeply instantiated.
|
||||
let all_are_narrow = cycle.iter().all(|sym| {
|
||||
let typ = &pending_aliases.get(sym).unwrap().typ;
|
||||
typ.is_tag_union_like() && typ.is_narrow()
|
||||
matches!(typ, Type::RecursiveTagUnion(..)) && typ.is_narrow()
|
||||
});
|
||||
|
||||
if all_are_narrow {
|
||||
|
Loading…
Reference in New Issue
Block a user