tidyverse / magrittr

Improve the readability of R code with the pipe
https://magrittr.tidyverse.org
Other
957 stars 157 forks source link

validate lhs is a LANGSXP before CDR usage #240

Closed kevinushey closed 3 years ago

kevinushey commented 3 years ago

Closes #239. I think the code here intends to handle call objects that might be on the LHS of the pipe; e.g. usages like:

rnorm(1) %>% identity()

and if that's indeed the case, then I think the type of lhs needs to be checked before accessing via CDR().

lionel- commented 3 years ago

Thanks for finding and fixing the bug!