mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 15:21:12 +00:00
assign guarded patterns at the last moment
This commit is contained in:
parent
78309f2607
commit
e32a06b088
3 changed files with 24 additions and 21 deletions
|
@ -5096,16 +5096,14 @@ fn from_can_when<'a>(
|
|||
jump,
|
||||
);
|
||||
|
||||
let new_guard_stmt =
|
||||
store_pattern(env, procs, layout_cache, &pattern, cond_symbol, guard_stmt);
|
||||
// let new_guard_stmt = store_pattern(env, procs, layout_cache, &pattern, cond_symbol, guard_stmt);
|
||||
|
||||
dbg!(symbol);
|
||||
(
|
||||
pattern,
|
||||
pattern.clone(),
|
||||
Guard::Guard {
|
||||
id,
|
||||
symbol,
|
||||
stmt: new_guard_stmt,
|
||||
pattern,
|
||||
stmt: guard_stmt,
|
||||
},
|
||||
branch_stmt,
|
||||
)
|
||||
|
@ -5512,7 +5510,7 @@ fn substitute_in_expr<'a>(
|
|||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn store_pattern<'a>(
|
||||
pub fn store_pattern<'a>(
|
||||
env: &mut Env<'a, '_>,
|
||||
procs: &mut Procs<'a>,
|
||||
layout_cache: &mut LayoutCache<'a>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue