Closed sebffischer closed 4 months ago
This is related to the curly braces, because the same code with (
instead of {
runs
Poking at this I found another odd one that may be related.
f <- function(a, b) (a, b)
f({ x <- 1 }, { y <- 2 })
#> [[1]]
#> a @ <environment 0x14d1a4>
#>
#> [[2]]
#> a @ <environment 0x14d1a4>
I’m guessing that something broke when the branches were added to support tail calls, meaning that expression results only resolve when they absolutely have to. Probably an overlooked code path.