summaryrefslogtreecommitdiff
path: root/src/parser/contexts.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser/contexts.h')
-rw-r--r--src/parser/contexts.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/parser/contexts.h b/src/parser/contexts.h
index 7e70b6776..387cb146e 100644
--- a/src/parser/contexts.h
+++ b/src/parser/contexts.h
@@ -1259,12 +1259,6 @@ struct ParseModuleTypesCtx : TypeParserCtx<ParseModuleTypesCtx>,
}
Result<HeapType> getBlockTypeFromTypeUse(Index pos, TypeUse use) {
- assert(use.type.isSignature());
- if (use.type.getSignature().params != Type::none) {
- return in.err(pos, "block parameters not yet supported");
- }
- // TODO: Once we support block parameters, return an error here if any of
- // them are named.
return use.type;
}
@@ -1451,6 +1445,12 @@ struct ParseDefsCtx : TypeParserCtx<ParseDefsCtx> {
}
Result<HeapType> getBlockTypeFromTypeUse(Index pos, HeapType type) {
+ assert(type.isSignature());
+ if (type.getSignature().params != Type::none) {
+ return in.err(pos, "block parameters not yet supported");
+ }
+ // TODO: Once we support block parameters, return an error here if any of
+ // them are named.
return type;
}