mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
Only recursive tag unions are relevant in illegal cycles
This commit is contained in:
parent
b8defcbc75
commit
e946b972f7
1 changed files with 1 additions and 1 deletions
|
@ -1628,7 +1628,7 @@ fn correct_mutual_recursive_type_alias<'a>(
|
||||||
// because we need all the types to be deeply instantiated.
|
// because we need all the types to be deeply instantiated.
|
||||||
let all_are_narrow = cycle.iter().all(|sym| {
|
let all_are_narrow = cycle.iter().all(|sym| {
|
||||||
let typ = &pending_aliases.get(sym).unwrap().typ;
|
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 {
|
if all_are_narrow {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue