aboutsummaryrefslogtreecommitdiff
path: root/src/checker/stmt.c
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-01-05 23:50:44 +0000
committerGinger Bill <bill@gingerbill.org>2017-01-05 23:50:44 +0000
commitfc1af0a04bfce7b64e1f776951016ea975e4cd21 (patch)
treea8d9efab75679daec2b44c37b3dd6b48cceaa765 /src/checker/stmt.c
parent4afb3f8fa41f7176cc80b4f6ad159526e8492e5e (diff)
Fix build error caused by invalid iterator types in `for`v0.0.5c
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);
}
}