mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
fix usage of layout in Switch; always use outer layout
This commit is contained in:
parent
765c81ad09
commit
ee2a1d74ed
1 changed files with 2 additions and 2 deletions
|
@ -263,7 +263,7 @@ fn stmt_spec(
|
|||
cond_layout: _,
|
||||
branches,
|
||||
default_branch,
|
||||
ret_layout,
|
||||
ret_layout: _lies,
|
||||
} => {
|
||||
let mut cases = Vec::with_capacity(branches.len() + 1);
|
||||
|
||||
|
@ -274,7 +274,7 @@ fn stmt_spec(
|
|||
|
||||
for branch in it {
|
||||
let block = builder.add_block();
|
||||
let value_id = stmt_spec(builder, env, block, ret_layout, branch)?;
|
||||
let value_id = stmt_spec(builder, env, block, layout, branch)?;
|
||||
cases.push(BlockExpr(block, value_id));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue