Re: [Rd] mget call can trigger C stack usage error

2016-09-08 Thread Gabriel Becker
Alexandre, AFAICS, this code actually causes infinite recursion, and here's why: 1. formals grabs returns the formals of the function identified by sys.function(sys.parent()) this ends up being print.new, whose first argument is x 2. mget looks for the symbol x in envir = as.environm

[Rd] mget call can trigger C stack usage error

2016-09-05 Thread Alexandre Courtiol
Hi all, not sure if you will call this a bug or something else but the following silly call trigger a low level error: foo <- list(x=1) class(foo) <- "new" print.new <- function(x, ...) print(mget(names(formals( foo > Error: C stack usage 7969412 is too close to the limit -- Alexandre Co