mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
get basic tests passing
This commit is contained in:
parent
889b189191
commit
badad1c1ad
1 changed files with 4 additions and 4 deletions
|
@ -309,7 +309,7 @@ pub fn list_replace_unsafe<'a, 'ctx, 'env>(
|
||||||
// Assume the bounds have already been checked earlier
|
// Assume the bounds have already been checked earlier
|
||||||
// (e.g. by List.replace or List.set, which wrap List.#replaceUnsafe)
|
// (e.g. by List.replace or List.set, which wrap List.#replaceUnsafe)
|
||||||
let new_list = match update_mode {
|
let new_list = match update_mode {
|
||||||
UpdateMode::InPlace => call_bitcode_fn(
|
UpdateMode::InPlace => call_list_bitcode_fn(
|
||||||
env,
|
env,
|
||||||
&[
|
&[
|
||||||
pass_list_cc(env, list),
|
pass_list_cc(env, list),
|
||||||
|
@ -320,7 +320,7 @@ pub fn list_replace_unsafe<'a, 'ctx, 'env>(
|
||||||
],
|
],
|
||||||
bitcode::LIST_REPLACE_IN_PLACE,
|
bitcode::LIST_REPLACE_IN_PLACE,
|
||||||
),
|
),
|
||||||
UpdateMode::Immutable => call_bitcode_fn(
|
UpdateMode::Immutable => call_list_bitcode_fn(
|
||||||
env,
|
env,
|
||||||
&[
|
&[
|
||||||
pass_list_cc(env, list),
|
pass_list_cc(env, list),
|
||||||
|
@ -351,11 +351,11 @@ pub fn list_replace_unsafe<'a, 'ctx, 'env>(
|
||||||
|
|
||||||
let result = env
|
let result = env
|
||||||
.builder
|
.builder
|
||||||
.build_insert_value(result, old_element, 0, "insert_value")
|
.build_insert_value(result, new_list, 0, "insert_list")
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
env.builder
|
env.builder
|
||||||
.build_insert_value(result, new_list, 1, "insert_list")
|
.build_insert_value(result, old_element, 1, "insert_value")
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.into_struct_value()
|
.into_struct_value()
|
||||||
.into()
|
.into()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue