mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 15:21:12 +00:00
fix bug: incorrect var definition before switch
This commit is contained in:
parent
0ac5a16e86
commit
83fd1de89b
2 changed files with 37 additions and 1 deletions
|
@ -1533,7 +1533,7 @@ fn decide_to_branching<'a>(
|
|||
ret_layout,
|
||||
};
|
||||
|
||||
for (symbol, layout, expr) in cond_stores_vec.into_iter() {
|
||||
for (symbol, layout, expr) in cond_stores_vec.into_iter().rev() {
|
||||
switch = Stmt::Let(symbol, expr, layout, env.arena.alloc(switch));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue