summaryrefslogtreecommitdiff
path: root/src/validator.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/validator.cc')
-rw-r--r--src/validator.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/validator.cc b/src/validator.cc
index a3a21d9b..aaf5308d 100644
--- a/src/validator.cc
+++ b/src/validator.cc
@@ -1120,8 +1120,10 @@ void Validator::CheckElemSegments(const Module* module) {
if (auto elem_segment_field = dyn_cast<ElemSegmentModuleField>(&field)) {
auto&& elem_segment = elem_segment_field->elem_segment;
const Table* table;
- for (const Var& var : elem_segment.vars) {
- CheckFuncVar(&var, nullptr);
+ for (const ElemExpr& elem_expr : elem_segment.elem_exprs) {
+ if (elem_expr.kind == ElemExprKind::RefFunc) {
+ CheckFuncVar(&elem_expr.var, nullptr);
+ }
}
if (elem_segment.passive) {