diff options
Diffstat (limited to 'parse.c')
-rw-r--r-- | parse.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -822,6 +822,12 @@ static bool parse_fn_expr(Parser *p, FnExpr *f) { } else { if (!parse_decl_list(p, &f->params, DECL_END_RPAREN_COMMA)) return false; + arr_foreach(f->params, Declaration, param) { + if (param->type.kind == TYPE_TUPLE) { + err_print(param->where, "Functions can't have tuple parameters."); + return false; + } + } arr_foreach(f->params, Declaration, param) param->flags |= DECL_IS_PARAM; } |