mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
List.get with negative index in repl
This commit is contained in:
parent
917e0e2027
commit
b0d57587e3
8 changed files with 109 additions and 33 deletions
|
@ -160,7 +160,7 @@ impl<'a> ReplApp<'a> for WasmReplApp<'a> {
|
|||
_main_fn_name: &str,
|
||||
_ret_bytes: usize,
|
||||
mut transform: F,
|
||||
) -> T
|
||||
) -> Option<T>
|
||||
where
|
||||
F: FnMut(&'a Self::Memory, usize) -> T,
|
||||
Self::Memory: 'a,
|
||||
|
@ -172,7 +172,7 @@ impl<'a> ReplApp<'a> for WasmReplApp<'a> {
|
|||
let app_result_addr = js_get_result_and_memory(copied_bytes.as_mut_ptr());
|
||||
let mem = self.arena.alloc(WasmMemory { copied_bytes });
|
||||
|
||||
transform(mem, app_result_addr)
|
||||
Some(transform(mem, app_result_addr))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue