sloop
sloop copied to clipboard
Quoted parens does not inherit from call
p. <- quote((.))
sloop::s3_class(p.)
#> [1] "(" "call"
foo <- function(x) UseMethod("foo")
foo.call <- function(x) "produced inside foo.call"
foo(p.)
#> Error in UseMethod("foo"): no applicable method for 'foo' applied to an object of class "("
`foo.(` <- function(x) "produced inside foo.("
foo(p.)
#> [1] "produced inside foo.("
Created on 2019-11-22 by the reprex package (v0.3.0)