mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-13 15:26:24 +00:00
parent
4dbe90db93
commit
23fc7f1413
3 changed files with 81 additions and 3 deletions
|
@ -7079,10 +7079,18 @@ fn substitute_in_stmt_help<'a>(
|
|||
default_branch,
|
||||
ret_layout,
|
||||
} => {
|
||||
let opt_default = substitute_in_stmt_help(arena, default_branch.1, subs);
|
||||
|
||||
let mut did_change = false;
|
||||
|
||||
let cond_symbol = match substitute(subs, *cond_symbol) {
|
||||
Some(s) => {
|
||||
did_change = true;
|
||||
s
|
||||
}
|
||||
None => *cond_symbol,
|
||||
};
|
||||
|
||||
let opt_default = substitute_in_stmt_help(arena, default_branch.1, subs);
|
||||
|
||||
let opt_branches = Vec::from_iter_in(
|
||||
branches.iter().map(|(label, info, branch)| {
|
||||
match substitute_in_stmt_help(arena, branch, subs) {
|
||||
|
@ -7119,7 +7127,7 @@ fn substitute_in_stmt_help<'a>(
|
|||
};
|
||||
|
||||
Some(arena.alloc(Switch {
|
||||
cond_symbol: *cond_symbol,
|
||||
cond_symbol,
|
||||
cond_layout: *cond_layout,
|
||||
default_branch,
|
||||
branches,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue