mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
Update test function catcher to take records by reference
This commit is contained in:
parent
de44e90fda
commit
7b1dc7eff0
2 changed files with 174 additions and 116 deletions
|
@ -81,7 +81,8 @@ impl<'ctx> From<BasicValueEnum<'ctx>> for RocStruct<'ctx> {
|
|||
fn from(basic_value: BasicValueEnum<'ctx>) -> Self {
|
||||
match basic_value {
|
||||
BasicValueEnum::StructValue(struct_value) => RocStruct::ByValue(struct_value),
|
||||
_ => panic!("Expected struct value"),
|
||||
BasicValueEnum::PointerValue(struct_ptr) => RocStruct::ByReference(struct_ptr),
|
||||
_ => panic!("Expected struct or pointer value"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue