Skip to content

Commit

Permalink
use MISSING_ARGUMENT_ERROR() in one more case
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@87082 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
maechler committed Aug 31, 2024
1 parent d3bfbfe commit 0e1629a
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/main/eval.c
Original file line number Diff line number Diff line change
Expand Up @@ -1078,6 +1078,8 @@ static void handle_eval_depth_overflow(void)

/* Return value of "e" evaluated in "rho". */

static void MISSING_ARGUMENT_ERROR(SEXP symbol, SEXP rho);

/* some places, e.g. deparse2buff, call this with a promise and rho = NULL */
SEXP eval(SEXP e, SEXP rho)
{
Expand Down Expand Up @@ -1181,12 +1183,7 @@ SEXP eval(SEXP e, SEXP rho)
/* the error signaled here for a missing ..d matches the one
signaled in getvar() for byte compiled code, but ...elt()
signals a slightly different error (see PR18661) */
const char *n = CHAR(PRINTNAME(e));
if(*n) errorcall(getLexicalCall(rho),
_("argument \"%s\" is missing, with no default"),
CHAR(PRINTNAME(e)));
else errorcall(getLexicalCall(rho),
_("argument is missing, with no default"));
MISSING_ARGUMENT_ERROR(e, rho);
}
else if (TYPEOF(tmp) == PROMSXP) {
ENSURE_PROMISE_IS_EVALUATED(tmp);
Expand Down Expand Up @@ -3060,7 +3057,6 @@ static Rboolean checkTailPosition(SEXP call, SEXP code, SEXP rho)
else return FALSE;
}

static void MISSING_ARGUMENT_ERROR(SEXP symbol, SEXP rho);
attribute_hidden SEXP do_tailcall(SEXP call, SEXP op, SEXP args, SEXP rho)
{
#ifdef SUPPORT_TAILCALL
Expand Down

0 comments on commit 0e1629a

Please sign in to comment.