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>.
May be the same as tidyverse/glue#166