Index: test/mjsunit/wasm/ffi-error.js |
diff --git a/test/mjsunit/wasm/ffi-error.js b/test/mjsunit/wasm/ffi-error.js |
index 6d4787e70abba5fd1333a31e0581975e90154f0d..521f62b50261b5bf09b3ceceb57a62c5bc770475 100644 |
--- a/test/mjsunit/wasm/ffi-error.js |
+++ b/test/mjsunit/wasm/ffi-error.js |
@@ -115,3 +115,14 @@ assertThrows(function() { |
main(13); |
}, TypeError); |
})(); |
+ |
+(function ImportSymbolToNumberThrows() { |
+ var builder = new WasmModuleBuilder(); |
+ var index = builder.addImport("func", kSig_i_v); |
+ builder.addFunction("main", kSig_i_v) |
+ .addBody([kExprCallFunction, 0]) |
+ .exportFunc(); |
+ var func = () => Symbol(); |
+ var main = builder.instantiate({func: func}).exports.main; |
+ assertThrows(() => main(), TypeError); |
+})(); |