mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
Add Expr::ErasedLoad
This commit is contained in:
parent
2c838aa5c2
commit
283b9d53d6
11 changed files with 92 additions and 17 deletions
|
@ -737,6 +737,14 @@ impl<'a> BorrowInfState<'a> {
|
|||
self.own_var(*callee);
|
||||
}
|
||||
|
||||
ErasedLoad { symbol, field: _ } => {
|
||||
// if the extracted value is owned, the erasure is too
|
||||
self.if_is_owned_then_own(*symbol, z);
|
||||
|
||||
// if the erasure is owned, so is the extracted value
|
||||
self.if_is_owned_then_own(z, *symbol);
|
||||
}
|
||||
|
||||
Reset { symbol: x, .. } | ResetRef { symbol: x, .. } => {
|
||||
self.own_var(z);
|
||||
self.own_var(*x);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue