Bug 15199 - Default values not applied to ... arguments
Summary: Default values not applied to ... arguments
Status: ASSIGNED
Alias: None
Product: R
Classification: Unclassified
Component: Low-level (show other bugs)
Version: R-devel (trunk)
Hardware: All All
: P5 normal
Assignee: R-core
URL:
Depends on:
Blocks:
 
Reported: 2013-02-09 15:53 UTC by Duncan Murdoch
Modified: 2017-04-26 07:23 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Duncan Murdoch 2013-02-09 15:53:20 UTC
In this example, the default for b is lost:

f <- function(...) { g(...) }

g <- function(a=4,b=5,c=6) { 
  print(c(missing(a), missing(b), missing(c)))
  b 
}

f(1,,3) 
# [1] FALSE  TRUE FALSE
# Error in g(...) : argument is missing, with no default

We see that missingness is passed down correctly, but the assignment of defaults doesn't happen.
Comment 1 Martin Maechler 2017-04-26 07:23:43 UTC
I think we had agreed that this _was_ a bug; and it is still present.
((I'm not volunteering to fix it though))