mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
fix incorrect element width used for List.append in dev backend
This commit is contained in:
parent
685025a240
commit
bd0cb6338e
2 changed files with 29 additions and 1 deletions
|
@ -2949,7 +2949,11 @@ impl<
|
|||
self.load_layout_alignment(list_layout, Symbol::DEV_TMP);
|
||||
|
||||
// Load element_width argument (usize).
|
||||
self.load_layout_stack_size(*ret_layout, Symbol::DEV_TMP2);
|
||||
let element_layout = match self.interner().get_repr(*ret_layout) {
|
||||
LayoutRepr::Builtin(Builtin::List(e)) => e,
|
||||
_ => unreachable!(),
|
||||
};
|
||||
self.load_layout_stack_size(element_layout, Symbol::DEV_TMP2);
|
||||
|
||||
// Load UpdateMode.Immutable argument (0u8)
|
||||
let u8_layout = Layout::U8;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue