The following code:
Should only work if:
expr is a variable or an atom at compile-time
- fun is an atom at compile-time
- arity is an integer at compile-time
If those conditions are not met and it is valid, we should deprecate it.
Originally posted by @josevalim in #14090 (comment)