From 31f0f9b28c539df2d63562fa9b976928a97d101e Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 18 Apr 2018 06:42:25 -0700 Subject: apply: diagnose missing argument. The argument is required in apply and iapply; and that is documented. * eval.c (apply_intrinsic_frob_args): Check for args being empty and throw. --- eval.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eval.c b/eval.c index adff9db7..c98625a8 100644 --- a/eval.c +++ b/eval.c @@ -1122,7 +1122,9 @@ static val apply_frob_args(val args) static val apply_intrinsic_frob_args(val args) { - if (!cdr(args)) { + if (!args) { + uw_throwf(error_s, lit("apply: trailing-args argument missing"), nao); + } if (!cdr(args)) { return tolist(car(args)); } else { list_collect_decl (out, ptail); -- cgit v1.2.3