Fix set_shared_int_list for LLVM

This commit is contained in:
Richard Feldman 2020-03-21 20:55:23 -04:00
parent 8a26cac3f2
commit d0a1adfef9
2 changed files with 5 additions and 3 deletions

View file

@ -1088,6 +1088,7 @@ fn call_with_args<'a, 'ctx, 'env>(
}
}
Symbol::LIST_SET => {
// List.set : List elem, Int, elem -> List elem
let builder = env.builder;
debug_assert!(args.len() == 3);

View file

@ -574,7 +574,7 @@ mod test_gen {
#[test]
fn set_shared_int_list() {
assert_evals_to!(
assert_llvm_evals_to!(
indoc!(
r#"
shared = [ 2, 4 ]
@ -585,8 +585,9 @@ mod test_gen {
{ x, y: List.getUnsafe shared 1 }
"#
),
(4, 77),
(i64, i64)
(77, 4),
(i64, i64),
|x| x
);
}