Update test function catcher to take records by reference

This commit is contained in:
Ayaz Hafiz 2023-06-12 18:16:04 -05:00
parent de44e90fda
commit 7b1dc7eff0
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
2 changed files with 174 additions and 116 deletions

View file

@ -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"),
}
}
}