commit 131d90a4171e3ad38303c3a8d769233dde585802
parent 371d85f2a8fc8085aeb54403b8d39305ee60aa11
Author: Eyal Sawady <ecs@d2evs.net>
Date: Fri, 13 Aug 2021 10:56:39 +0000
check: error out on too few tuple values
Signed-off-by: Eyal Sawady <ecs@d2evs.net>
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/check.c b/src/check.c
@@ -2516,6 +2516,10 @@ check_expr_tuple(struct context *ctx,
atuple = atuple->next;
ttuple = ttuple->next;
}
+ if (ttuple) {
+ return error(aexpr->loc, expr, errors,
+ "Too few values for tuple type");
+ }
return errors;
}