summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/wast-parser.cc4
-rw-r--r--test/desugar/locals.txt2
2 files changed, 2 insertions, 4 deletions
diff --git a/src/wast-parser.cc b/src/wast-parser.cc
index c3ed9d28..64ac4c82 100644
--- a/src/wast-parser.cc
+++ b/src/wast-parser.cc
@@ -320,8 +320,6 @@ Result CheckFuncTypeVarMatchesExplicit(const Location& loc,
Errors* errors) {
Result result = Result::Ok;
if (decl.has_func_type) {
- // This should only be run after resolving names.
- assert(decl.type_var.is_index());
const FuncType* func_type = module.GetFuncType(decl.type_var);
if (func_type) {
result |=
@@ -1040,8 +1038,8 @@ Result WastParser::ParseModuleFieldList(Module* module) {
CHECK_RESULT(Synchronize(IsModuleField));
}
}
- CHECK_RESULT(ResolveNamesModule(module, errors_));
CHECK_RESULT(ResolveFuncTypes(module, errors_));
+ CHECK_RESULT(ResolveNamesModule(module, errors_));
return Result::Ok;
}
diff --git a/test/desugar/locals.txt b/test/desugar/locals.txt
index 41b40c27..cd615d2a 100644
--- a/test/desugar/locals.txt
+++ b/test/desugar/locals.txt
@@ -10,5 +10,5 @@
(func (;0;) (type 0) (param i32) (result i32)
(local $var i32)
local.get 0
- local.tee 0))
+ local.tee $var))
;;; STDOUT ;;)