mirror of
https://github.com/roc-lang/roc.git
synced 2025-11-15 18:38:36 +00:00
don't refcount the empty tag union
This commit is contained in:
parent
fb123b8990
commit
cb4b726c7e
1 changed files with 21 additions and 17 deletions
|
|
@ -1280,6 +1280,9 @@ fn refcount_union_nonrec<'a>(
|
||||||
|
|
||||||
let continuation = rc_return_stmt(root, ident_ids, ctx);
|
let continuation = rc_return_stmt(root, ident_ids, ctx);
|
||||||
|
|
||||||
|
if tag_layouts.is_empty() {
|
||||||
|
continuation
|
||||||
|
} else {
|
||||||
let switch_stmt = refcount_union_contents(
|
let switch_stmt = refcount_union_contents(
|
||||||
root,
|
root,
|
||||||
ident_ids,
|
ident_ids,
|
||||||
|
|
@ -1299,6 +1302,7 @@ fn refcount_union_nonrec<'a>(
|
||||||
switch_stmt,
|
switch_stmt,
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn refcount_union_contents<'a>(
|
fn refcount_union_contents<'a>(
|
||||||
root: &mut CodeGenHelp<'a>,
|
root: &mut CodeGenHelp<'a>,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue