Fix build error caused by invalid iterator types in for

This commit is contained in:
Ginger Bill
2017-01-05 23:50:44 +00:00
parent 4afb3f8fa4
commit fc1af0a04b
3 changed files with 8 additions and 2 deletions
+3 -1
View File
@@ -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);
}
}