aboutsummaryrefslogtreecommitdiff
path: root/src/checker/stmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/checker/stmt.c')
-rw-r--r--src/checker/stmt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/checker/stmt.c b/src/checker/stmt.c
index 3a257f884..b6bf9b1d0 100644
--- a/src/checker/stmt.c
+++ b/src/checker/stmt.c
@@ -654,7 +654,9 @@ void check_stmt_internal(Checker *c, AstNode *node, u32 flags) {
if (val == NULL) {
gbString s = expr_to_string(operand.expr);
- error_node(node, "Cannot iterate over %s", s);
+ gbString t = type_to_string(operand.type);
+ error_node(operand.expr, "Cannot iterate over `%s` of type `%s`", s, t);
+ gb_string_free(t);
gb_string_free(s);
}
}