Re: [Rd] possible bug in utils::removeSource - NULL argument is silently dropped

2017-12-11 Thread Martin Maechler
> Dénes Tóth > on Mon, 11 Dec 2017 11:39:38 +0100 writes: > Dear R-Core Team, > I found an unexpected behaviour in utils::removeSource (also present in > r-devel as of today). > --- > > # create a function which accepts NULL argument > foo <- function(x, y) { >if (i

[Rd] possible bug in utils::removeSource - NULL argument is silently dropped

2017-12-11 Thread Dénes Tóth
Dear R-Core Team, I found an unexpected behaviour in utils::removeSource (also present in r-devel as of today). --- # create a function which accepts NULL argument foo <- function(x, y) { if (is.null(y)) y <- "default foo" attr(x, "foo") <- y x } # create a function which utilizes 'foo