mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
not so fast
This commit is contained in:
parent
564efd528a
commit
6ab90cd15d
2 changed files with 14 additions and 7 deletions
|
@ -455,7 +455,14 @@ fn unify_tag_union(
|
|||
(Some(v1), Some(_v2)) => Some(v1),
|
||||
};
|
||||
|
||||
if tags1.len() == 1 && tags2.len() == 1 && tags1 == tags2 {
|
||||
// heuristic: our closure defunctionalization scheme generates a bunch of one-tag unions
|
||||
// also our number types fall in this category too.
|
||||
if tags1.len() == 1
|
||||
&& tags2.len() == 1
|
||||
&& tags1 == tags2
|
||||
&& subs.get_content_without_compacting(rec1.ext)
|
||||
== subs.get_content_without_compacting(rec2.ext)
|
||||
{
|
||||
return unify_shared_tags_merge(subs, ctx, tags1, rec1.ext, recursion_var);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue