mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 00:01:16 +00:00
Verify layouts of extracted specialization symbols
This commit is contained in:
parent
8228df55c7
commit
674ec3beae
2 changed files with 131 additions and 23 deletions
|
@ -1210,8 +1210,15 @@ pub fn optimize_when<'a>(
|
|||
// bind the fields referenced in the pattern. For guards this happens separately, so
|
||||
// the pattern variables are defined when evaluating the guard.
|
||||
if !has_guard {
|
||||
branch =
|
||||
crate::ir::store_pattern(env, procs, layout_cache, &pattern, cond_symbol, branch);
|
||||
branch = crate::ir::store_pattern(
|
||||
env,
|
||||
procs,
|
||||
layout_cache,
|
||||
&pattern,
|
||||
cond_layout,
|
||||
cond_symbol,
|
||||
branch,
|
||||
);
|
||||
}
|
||||
|
||||
let ((branch_index, choice), opt_jump) = create_choices(&target_counts, index, branch);
|
||||
|
@ -1723,7 +1730,15 @@ fn decide_to_branching<'a>(
|
|||
body: arena.alloc(decide),
|
||||
};
|
||||
|
||||
crate::ir::store_pattern(env, procs, layout_cache, &pattern, cond_symbol, join)
|
||||
crate::ir::store_pattern(
|
||||
env,
|
||||
procs,
|
||||
layout_cache,
|
||||
&pattern,
|
||||
cond_layout,
|
||||
cond_symbol,
|
||||
join,
|
||||
)
|
||||
}
|
||||
Chain {
|
||||
test_chain,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue