summaryrefslogtreecommitdiff
path: root/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/parse.c b/parse.c
index b336fbf..11a698f 100644
--- a/parse.c
+++ b/parse.c
@@ -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;
}