Closed DanChaltiel closed 1 month ago
Thank you, unfortunately I think that this is a sufficiently specific edge case that this section would not be very helpful.
I'd welcome a PR adding a section that speaks more generally about the caveats of caller-arg/substitute in contexts where the argument might be inlined in the call stack. Print and auto-print could be used as an example to show the difference. This section would need to be pedagogical about the concepts involved while being sufficiently succinct that it does not take up too much space in the documentation.
It is quite understandable. Unfortunately, I'm afraid I'm not expert enough on the call stack to be pedagogical about it.
Hi,
I stumbled upon the
caller_arg()
limitation when redefining a print method for hours without understanding, and thought it might deserve a bit of documentation.As stated in https://stackoverflow.com/a/4963041/3888000:
Here is a
rlang
specific reprex:Created on 2024-02-21 with reprex v2.0.2