From b710392d743682fa1abb43e184f32ead8936e532 Mon Sep 17 00:00:00 2001 From: StunxFS Date: Mon, 25 Dec 2023 18:05:50 -0400 Subject: [PATCH] checker: allow for in with slices --- rivetc/src/checker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 )