mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 11:52:19 +00:00
expect as borrowed
This commit is contained in:
parent
797da23f17
commit
99dae2fd80
1 changed files with 16 additions and 2 deletions
|
@ -648,12 +648,19 @@ fn insert_refcount_operations_stmt<'v, 'a>(
|
|||
} => {
|
||||
let new_remainder = insert_refcount_operations_stmt(arena, environment, remainder);
|
||||
|
||||
let newer_remainder = consume_and_insert_dec_stmts(
|
||||
arena,
|
||||
environment,
|
||||
environment.borrowed_usages(lookups.iter().copied()),
|
||||
new_remainder,
|
||||
);
|
||||
|
||||
arena.alloc(Stmt::Expect {
|
||||
condition: *condition,
|
||||
region: *region,
|
||||
lookups,
|
||||
variables,
|
||||
remainder: new_remainder,
|
||||
remainder: newer_remainder,
|
||||
})
|
||||
}
|
||||
Stmt::ExpectFx {
|
||||
|
@ -665,12 +672,19 @@ fn insert_refcount_operations_stmt<'v, 'a>(
|
|||
} => {
|
||||
let new_remainder = insert_refcount_operations_stmt(arena, environment, remainder);
|
||||
|
||||
let newer_remainder = consume_and_insert_dec_stmts(
|
||||
arena,
|
||||
environment,
|
||||
environment.borrowed_usages(lookups.iter().copied()),
|
||||
new_remainder,
|
||||
);
|
||||
|
||||
arena.alloc(Stmt::ExpectFx {
|
||||
condition: *condition,
|
||||
region: *region,
|
||||
lookups,
|
||||
variables,
|
||||
remainder: new_remainder,
|
||||
remainder: newer_remainder,
|
||||
})
|
||||
}
|
||||
Stmt::Dbg {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue