summaryrefslogtreecommitdiff
path: root/src/parser
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser')
-rw-r--r--src/parser/parse-3-implicit-types.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/parser/parse-3-implicit-types.cpp b/src/parser/parse-3-implicit-types.cpp
index 3a3a867e1..cf13ae0f7 100644
--- a/src/parser/parse-3-implicit-types.cpp
+++ b/src/parser/parse-3-implicit-types.cpp
@@ -29,6 +29,10 @@ parseImplicitTypeDefs(ParseDeclsCtx& decls,
WithPosition with(ctx, pos);
CHECK_ERR(typeuse(ctx));
}
+ // Record type indices now that all the types have been parsed.
+ for (Index i = 0; i < types.size(); ++i) {
+ decls.wasm.typeIndices.insert({types[i], i});
+ }
return Ok{};
}