Skip to content

Commit ca55f12

Browse files
fix(core): results for async task generation (#1374)
This commit fixes the parameter generation when emitting the `AsyncTaskReturn` instruction -- in the past the "default" was expeted to be a single I32, but this was a misreading of the spec, it is possible for an task.return to return nothing if there are no results to return.
1 parent 93c9ee3 commit ca55f12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/core/src/abi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1247,7 +1247,7 @@ impl<'a, B: Bindgen> Generator<'a, B> {
12471247
if async_ =>
12481248
{
12491249
let name = &format!("[task-return]{}", func.name);
1250-
let params = results.as_deref().unwrap_or(&[WasmType::I32]);
1250+
let params = results.as_deref().unwrap_or_default();
12511251
self.emit(&Instruction::AsyncTaskReturn { name, params });
12521252
}
12531253

0 commit comments

Comments
 (0)