aboutsummaryrefslogtreecommitdiff
path: root/src/check_stmt.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2024-03-20 18:09:57 +0000
committergingerBill <bill@gingerbill.org>2024-03-20 18:09:57 +0000
commit8e0806be2d499c1eee1e9b4c124c012794d97b6d (patch)
tree88be5ed540134decf26d102f00be69e1f85588fb /src/check_stmt.cpp
parentc17adc98f5dfd313d4123c8a08d23eb1907e238f (diff)
Fix #3301
Diffstat (limited to 'src/check_stmt.cpp')
-rw-r--r--src/check_stmt.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp
index 4280e7578..7cccab226 100644
--- a/src/check_stmt.cpp
+++ b/src/check_stmt.cpp
@@ -1661,6 +1661,8 @@ gb_internal void check_range_stmt(CheckerContext *ctx, Ast *node, u32 mod_flags)
defer (gb_string_free(s));
defer (gb_string_free(t));
+ ERROR_BLOCK();
+
error(operand.expr, "Cannot iterate over '%s' of type '%s'", s, t);
if (rs->vals.count == 1) {