From e6db72d6426b02b869622eb4ba4839c31391d0c4 Mon Sep 17 00:00:00 2001 From: Teun van den Brand Date: Mon, 21 Oct 2024 11:17:10 +0200 Subject: [PATCH] ensure `list2()` can be found --- R/boilerplates.R | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/R/boilerplates.R b/R/boilerplates.R index 111786a722..71e5318929 100644 --- a/R/boilerplates.R +++ b/R/boilerplates.R @@ -118,5 +118,8 @@ boilerplate.Geom <- function(x, ..., checks = NULL, env = caller_env()) { body <- call2("{", !!!checks, body) } - new_function(fmls, body, env = caller_env()) + # We encapsulate rlang::list2 + new_env <- new_environment(list(list2 = list2), env) + + new_function(fmls, body, env = new_env) }