Skip to content

Commit

Permalink
checker: allow for in with slices
Browse files Browse the repository at this point in the history
  • Loading branch information
StunxFS committed Dec 25, 2023
1 parent ec2e007 commit b710392
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rivetc/src/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down

0 comments on commit b710392

Please sign in to comment.