summaryrefslogtreecommitdiff
path: root/src/wasm2js.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm2js.h')
-rw-r--r--src/wasm2js.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wasm2js.h b/src/wasm2js.h
index 9a1a93b2b..add543b47 100644
--- a/src/wasm2js.h
+++ b/src/wasm2js.h
@@ -630,6 +630,10 @@ void Wasm2JSBuilder::addTable(Ref ast, Module* wasm) {
// emit assignments separately for each index.
Ref theArray = ValueBuilder::makeArray();
for (auto& table : wasm->tables) {
+ if (!table->type.isFunction()) {
+ Fatal() << "wasm2js doesn't support non-function tables\n";
+ }
+
if (!table->imported()) {
TableUtils::FlatTable flat(*wasm, *table);
if (flat.valid) {