This commit is contained in:
Folkert 2022-07-24 16:49:42 +02:00
parent 7953da1c71
commit 9cb611e540
No known key found for this signature in database
GPG Key ID: 1F17F6FFD112B97C

View File

@ -841,15 +841,15 @@ fn promote_to_wasm_test_wrapper<'a, 'ctx, 'env>(
&Layout::UNIT,
);
let (roc_return, output_type) = match roc_main_fn.get_type().get_return_type() {
let output_type = match roc_main_fn.get_type().get_return_type() {
Some(return_type) => {
let output_type = return_type.ptr_type(AddressSpace::Generic);
(RocReturn::Return, output_type.into())
output_type.into()
}
None => {
assert_eq!(roc_main_fn.get_type().get_param_types().len(), 1);
let output_type = roc_main_fn.get_type().get_param_types()[0];
(RocReturn::ByPointer, output_type)
output_type
}
};