Thanks. Fixed in R-devel and R-patched. This now gives
f <- function(n) {
print(ls.str())
rep("hello", times = n)
}
f(n)
## n :
## Error in f(n) : object 'n' not found
## In addition: Warning message:
## In f(n) : restarting interrupted promise evaluation
Best,
luke
On Mon, 18 Sep 201
Here is the same issue with closures:
g <- function(n) {
missing(n)
}
f <- function(n, force) {
if (force) {
tryCatch(n, error = function(...) NULL)
}
g(n)
}
g(`_x`)
#> [1] FALSE
f(`_x`, force = FALSE)
#> [1] FALSE
f(`_x`, forc