Skip to content

Commit b6676be

Browse files
authored
v8: fix error message for function signature mismatch. (#101)
Signed-off-by: Piotr Sikora <[email protected]>
1 parent cdc8657 commit b6676be

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/v8/v8.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ void V8::getModuleFunctionImpl(std::string_view function_name,
609609
"Bad function signature for: " + std::string(function_name) +
610610
", want: " + printValTypes(arg_valtypes) + " -> " + printValTypes(result_valtypes) +
611611
", but the module exports: " + printValTypes(func->type()->params()) + " -> " +
612-
printValTypes(result_valtypes));
612+
printValTypes(func->type()->results()));
613613
*function = nullptr;
614614
return;
615615
}
@@ -641,7 +641,7 @@ void V8::getModuleFunctionImpl(std::string_view function_name,
641641
"Bad function signature for: " + std::string(function_name) +
642642
", want: " + printValTypes(arg_valtypes) + " -> " + printValTypes(result_valtypes) +
643643
", but the module exports: " + printValTypes(func->type()->params()) + " -> " +
644-
printValTypes(result_valtypes));
644+
printValTypes(func->type()->results()));
645645
*function = nullptr;
646646
return;
647647
}

0 commit comments

Comments
 (0)