Skip to content

Can't cast <type> to <type> #776

@romainfrancois

Description

@romainfrancois
library(vctrs)
TestS4 <- suppressWarnings(setClass("TestS4", contains = "integer"))
setMethod('[', 'TestS4', function(x, i, ...){ 
  TestS4(unclass(x)[i, ...])  
})
vec_c(TestS4(3:1))
#> Error: Can't cast <TestS4> to <TestS4>.

May be the same as tidyverse/glue#166

library(glue)
vec_c(glue(""))
#> Error: Can't cast <glue> to <glue>.
vec_c(glue(""))
#> Error: Can't cast <glue> to <glue>.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions