summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/s2wasm.h4
-rw-r--r--test/dot_s/call.wast2
2 files changed, 2 insertions, 4 deletions
diff --git a/src/s2wasm.h b/src/s2wasm.h
index 978cbad2f..d51c90e5e 100644
--- a/src/s2wasm.h
+++ b/src/s2wasm.h
@@ -570,10 +570,8 @@ private:
auto typeName = cashew::IString((std::string("FUNCSIG_") + getSig(call)).c_str(), false);
if (wasm.functionTypesMap.count(typeName) == 0) {
auto type = allocator.alloc<FunctionType>();
+ *type = sigToFunctionType(getSig(curr));
type->name = typeName;
- for (auto operand : call->operands) {
- type->params.push_back(operand->type);
- }
wasm.addFunctionType(type);
call->fullType = type;
} else {
diff --git a/test/dot_s/call.wast b/test/dot_s/call.wast
index 27debb231..86a81ca96 100644
--- a/test/dot_s/call.wast
+++ b/test/dot_s/call.wast
@@ -1,7 +1,7 @@
(module
(memory 0 4294967295)
(type $FUNCSIG_v (func))
- (type $FUNCSIG_i (func))
+ (type $FUNCSIG_i (func (result i32)))
(import $i32_nullary "env" "i32_nullary" (result i32))
(import $i64_nullary "env" "i64_nullary" (result i64))
(import $float_nullary "env" "float_nullary" (result f32))