mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 08:34:33 +00:00
Fix List.set tests
This commit is contained in:
parent
94b41b099f
commit
be4abcf173
4 changed files with 22 additions and 29 deletions
|
@ -593,12 +593,7 @@ fn call_with_args<'a, 'ctx, 'env>(
|
|||
|
||||
builder.build_load(elem_ptr, "List.get")
|
||||
}
|
||||
Symbol::LIST_SET => {
|
||||
debug_assert!(args.len() == 3);
|
||||
|
||||
panic!("TODO List.set with clone");
|
||||
}
|
||||
Symbol::LIST_SET_IN_PLACE => {
|
||||
Symbol::LIST_SET /* TODO clone first for LIST_SET! */ | Symbol::LIST_SET_IN_PLACE => {
|
||||
debug_assert!(args.len() == 3);
|
||||
|
||||
let list_ptr = args[0].into_pointer_value();
|
||||
|
|
|
@ -56,7 +56,9 @@ pub fn basic_type_from_layout<'ctx>(
|
|||
.as_basic_type_enum(),
|
||||
Map(_, _) => panic!("TODO layout_to_basic_type for Builtin::Map"),
|
||||
Set(_) => panic!("TODO layout_to_basic_type for Builtin::Set"),
|
||||
List(_) => panic!("TODO layout_to_basic_type for Builtin::List"),
|
||||
List(elem_layout) => basic_type_from_layout(context, elem_layout)
|
||||
.ptr_type(AddressSpace::Generic)
|
||||
.as_basic_type_enum(),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue