sloop icon indicating copy to clipboard operation
sloop copied to clipboard

Quoted parens does not inherit from call

Open hadley opened this issue 4 years ago • 0 comments

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)

hadley avatar Nov 22 '19 14:11 hadley