summaryrefslogtreecommitdiff
path: root/src/wasm-builder.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-builder.h')
-rw-r--r--src/wasm-builder.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wasm-builder.h b/src/wasm-builder.h
index d1e06b5be..46ec734cc 100644
--- a/src/wasm-builder.h
+++ b/src/wasm-builder.h
@@ -618,10 +618,10 @@ public:
ret->finalize();
return ret;
}
- RefFunc* makeRefFunc(Name func, Type type) {
+ RefFunc* makeRefFunc(Name func, HeapType heapType) {
auto* ret = wasm.allocator.alloc<RefFunc>();
ret->func = func;
- ret->finalize(type);
+ ret->finalize(Type(heapType, NonNullable));
return ret;
}
RefEq* makeRefEq(Expression* left, Expression* right) {
@@ -870,7 +870,7 @@ public:
return makeRefNull(type);
}
if (type.isFunction()) {
- return makeRefFunc(value.getFunc(), type);
+ return makeRefFunc(value.getFunc(), type.getHeapType());
}
if (type.isRtt()) {
return makeRtt(value.type);