diff options
Diffstat (limited to 'src/wasm/wasm-s-parser.cpp')
-rw-r--r-- | src/wasm/wasm-s-parser.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/wasm/wasm-s-parser.cpp b/src/wasm/wasm-s-parser.cpp index 77ca8910d..614b30bdd 100644 --- a/src/wasm/wasm-s-parser.cpp +++ b/src/wasm/wasm-s-parser.cpp @@ -577,6 +577,7 @@ void SExpressionWasmBuilder::parseFunction(Element& s, bool preParseImport) { im->kind = ExternalKind::Function; im->functionType = wasm.getFunctionType(type)->name; wasm.addImport(im.release()); + if (currFunction) throw ParseException("import module inside function dec"); assert(!currFunction); currLocalTypes.clear(); nameMapper.clear(); |