mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
return result, not cacheable
This commit is contained in:
parent
7c215f9273
commit
9fb9ca4cbc
1 changed files with 5 additions and 3 deletions
|
@ -3211,7 +3211,7 @@ pub fn union_sorted_tags<'a>(
|
|||
let result = match roc_types::pretty_print::chase_ext_tag_union(env.subs, var, &mut tags_vec) {
|
||||
ChasedExt::Empty => {
|
||||
let opt_rec_var = get_recursion_var(env.subs, var);
|
||||
let Cacheable(result, _)= union_sorted_tags_help(env, tags_vec, opt_rec_var);
|
||||
let Cacheable(result, _) = union_sorted_tags_help(env, tags_vec, opt_rec_var);
|
||||
result
|
||||
}
|
||||
ChasedExt::NonEmpty { content, .. } => {
|
||||
|
@ -3224,11 +3224,13 @@ pub fn union_sorted_tags<'a>(
|
|||
// x
|
||||
// In such cases it's fine to drop the variable. We may be proven wrong in the future...
|
||||
let opt_rec_var = get_recursion_var(env.subs, var);
|
||||
union_sorted_tags_help(env, tags_vec, opt_rec_var)
|
||||
let Cacheable(result, _) = union_sorted_tags_help(env, tags_vec, opt_rec_var);
|
||||
result
|
||||
}
|
||||
RecursionVar { .. } => {
|
||||
let opt_rec_var = get_recursion_var(env.subs, var);
|
||||
union_sorted_tags_help(env, tags_vec, opt_rec_var)
|
||||
let Cacheable(result, _) = union_sorted_tags_help(env, tags_vec, opt_rec_var);
|
||||
result
|
||||
}
|
||||
|
||||
Error => return Err(LayoutProblem::Erroneous),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue