r-lib / rlang

Low-level API for programming with R
https://rlang.r-lib.org
Other
491 stars 131 forks source link

Example of `call_modify()` has unexpected output #1648

Open etiennebacher opened 11 months ago

etiennebacher commented 11 months ago

In the examples of call_modify(), there is this part:

# By default, arguments with the same name are kept. This has
# subtle implications, for instance you can move an argument to
# last position by removing it and remapping it:
call <- quote(foo(bar = , baz))
call_modify(call, bar = NULL, bar = missing_arg())
#> foo(bar = , baz)

The text doesn't match the output since the modified call is exactly the same as the original one.