mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
fix bug with dynamic size calls (copy structs now work)
This commit is contained in:
parent
e19b272a9e
commit
66f9ff1d58
2 changed files with 6 additions and 3 deletions
|
@ -153,15 +153,19 @@ impl<'a> ReplApp<'a> for ExpectReplApp<'a> {
|
|||
fn call_function_dynamic_size<T, F>(
|
||||
&mut self,
|
||||
_main_fn_name: &str,
|
||||
ret_bytes: usize,
|
||||
_ret_bytes: usize,
|
||||
transform: F,
|
||||
) -> T
|
||||
where
|
||||
F: Fn(&'a Self::Memory, usize) -> T,
|
||||
Self::Memory: 'a,
|
||||
{
|
||||
*self.memory.bytes_read.borrow_mut() = 0;
|
||||
|
||||
let result = transform(self.memory, self.offset);
|
||||
self.offset += ret_bytes;
|
||||
|
||||
self.offset += *self.memory.bytes_read.borrow();
|
||||
|
||||
result
|
||||
}
|
||||
}
|
||||
|
|
|
@ -410,7 +410,6 @@ mod test {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[ignore]
|
||||
fn lookup_copy_record() {
|
||||
run_expect_test(
|
||||
indoc!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue