diff --git a/rivetc/src/checker.py b/rivetc/src/checker.py index 37c506829..89d93e314 100644 --- a/rivetc/src/checker.py +++ b/rivetc/src/checker.py @@ -282,7 +282,7 @@ def check_stmt(self, stmt): elif isinstance(stmt, ast.ForStmt): iterable_t = self.check_expr(stmt.iterable) iterable_sym = iterable_t.symbol() - if iterable_sym.kind in (TypeKind.Array, TypeKind.DynArray): + if iterable_sym.kind in (TypeKind.Array, TypeKind.DynArray, TypeKind.Slice): elem_typ = self.comp.comptime_number_to_type( iterable_sym.info.elem_typ )