diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-01-20 00:21:40 +0000 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-01-20 00:21:40 +0000 |
| commit | 6d93aa429faba96415a7be135eb7296e69fb70a9 (patch) | |
| tree | 4b0120f4161185545fbb0b3dca2329802285da5e /src/check_stmt.c | |
| parent | 3f023509a7184a9146853e23b189c1a079323143 (diff) | |
Fix issue #10
Diffstat (limited to 'src/check_stmt.c')
| -rw-r--r-- | src/check_stmt.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/check_stmt.c b/src/check_stmt.c index 407205df2..1fa16e0ac 100644 --- a/src/check_stmt.c +++ b/src/check_stmt.c @@ -549,8 +549,17 @@ void check_stmt_internal(Checker *c, AstNode *node, u32 flags) { if (rs->results.count == 0) { error_node(node, "Expected %td return values, got 0", result_count); } else { + // TokenPos pos = rs->token.pos; + // if (pos.line == 10) { + // gb_printf_err("%s\n", type_to_string(variables[0]->type)); + // } check_init_variables(c, variables, result_count, rs->results, str_lit("return statement")); + // if (pos.line == 10) { + // AstNode *x = rs->results.e[0]; + // gb_printf_err("%s\n", expr_to_string(x)); + // gb_printf_err("%s\n", type_to_string(type_of_expr(&c->info, x))); + // } } } else if (rs->results.count > 0) { error_node(rs->results.e[0], "No return values expected"); |