diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/wasm-s-parser.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index 9d33504ac..2f1a1bc1b 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -1094,7 +1094,8 @@ private: Expression* makeCallIndirect(Element& s) { auto ret = allocator.alloc<CallIndirect>(); IString type = s[1]->str(); - ret->fullType = wasm.getFunctionType(type); + ret->fullType = wasm.checkFunctionType(type); + if (!ret->fullType) throw ParseException("invalid call_indirect type", s.line, s.col); assert(ret->fullType); ret->type = ret->fullType->result; ret->target = parseExpression(s[2]); |