mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
make List.mapN properly add all decrefs
This commit is contained in:
parent
82663fd30d
commit
66a7d08363
1 changed files with 2 additions and 2 deletions
|
@ -672,14 +672,14 @@ impl<'a, 'i> Context<'a, 'i> {
|
|||
match ownership {
|
||||
DataOwnedFunctionOwns | DataBorrowedFunctionOwns => {
|
||||
// elements have been consumed, must still consume the list itself
|
||||
let rest = self.arena.alloc($stmt);
|
||||
let rest = self.arena.alloc(stmt);
|
||||
let rc = Stmt::Refcounting(ModifyRc::DecRef(argument), rest);
|
||||
|
||||
stmt = self.arena.alloc(rc);
|
||||
}
|
||||
DataOwnedFunctionBorrows => {
|
||||
// must consume list and elements
|
||||
let rest = self.arena.alloc($stmt);
|
||||
let rest = self.arena.alloc(stmt);
|
||||
let rc = Stmt::Refcounting(ModifyRc::Dec(argument), rest);
|
||||
|
||||
stmt = self.arena.alloc(rc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue