Skip to content

unspecified() and scalar ptype2 symmetry is wrong #807

@DavisVaughan

Description

@DavisVaughan

With current master:

library(vctrs)

foobar <- function(x = list()) structure(x, class = "vctrs_foobar")

vec_ptype2(unspecified(), foobar())
#> list()
#> attr(,"class")
#> [1] "vctrs_foobar"

vec_ptype2(foobar(), unspecified())
#> Error: `x` must be a vector, not a `vctrs_foobar` object

Created on 2020-02-11 by the reprex package (v0.3.0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions