
combining data frames with foreign classes uses fallback
========================================================

> foo <- structure(mtcars[1:3], class = c("foo", "data.frame"))
> bar <- structure(mtcars[4:6], class = c("bar", "data.frame"))
> baz <- structure(mtcars[7:9], class = c("baz", "data.frame"))
> vec_ptype_common_fallback(foo, bar, baz)
Warning: Can't combine <foo> and <bar>; falling back to <data.frame>.

Warning: Can't combine <data.frame> and <baz>; falling back to <data.frame>.

[1] mpg  cyl  disp hp   drat wt   qsec vs   am  
<0 rows> (or 0-length row.names)

> vec_ptype_common_fallback(foo, baz, bar, baz, foo, bar)
Warning: Can't combine <foo> and <baz>; falling back to <data.frame>.

Warning: Can't combine <data.frame> and <bar>; falling back to <data.frame>.

[1] mpg  cyl  disp qsec vs   am   hp   drat wt  
<0 rows> (or 0-length row.names)

> with_fallback_warning(invisible(vec_rbind(foo, data.frame(), foo)))
Warning: Can't combine <foo> and <data.frame>; falling back to <data.frame>.

> with_fallback_warning(invisible(vec_rbind(foo, baz, bar, baz, foo, bar)))
Warning: Can't combine <foo> and <baz>; falling back to <data.frame>.

Warning: Can't combine <data.frame> and <bar>; falling back to <data.frame>.

> with_fallback_warning(invisible(vec_cbind(foo, data.frame(x = 1))))
Warning: Can't combine <foo> and <data.frame>; falling back to <data.frame>.

> with_fallback_warning(invisible(vec_cbind(foo, data.frame(x = 1), bar)))
Warning: Can't combine <foo> and <data.frame>; falling back to <data.frame>.

Warning: Can't combine <data.frame> and <bar>; falling back to <data.frame>.

> with_fallback_quiet(invisible(vec_rbind(foo, data.frame(), foo)))
> with_fallback_quiet(invisible(vec_rbind(foo, baz, bar, baz, foo, bar)))
> with_fallback_quiet(invisible(vec_cbind(foo, data.frame(x = 1))))
> with_fallback_quiet(invisible(vec_cbind(foo, data.frame(x = 1), bar)))

falls back to tibble for tibble subclasses (#1025)
==================================================

> with_fallback_warning(invisible(vec_rbind(foobar(tibble::as_tibble(mtcars)),
+ mtcars, foobaz(mtcars))))
Warning: Can't combine <vctrs_foobar> and <data.frame>; falling back to <tibble>.

Warning: Can't combine <tibble> and <vctrs_foobaz>; falling back to <tibble>.

> with_fallback_warning(invisible(vec_rbind(tibble::as_tibble(mtcars), foobar(
+   tibble::as_tibble(mtcars)))))
Warning: Can't combine <tibble> and <vctrs_foobar>; falling back to <tibble>.

> with_fallback_warning(invisible(vec_rbind(foobar(tibble::as_tibble(mtcars)),
+ mtcars, foobar(tibble::as_tibble(mtcars)))))
Warning: Can't combine <vctrs_foobar> and <data.frame>; falling back to <tibble>.

> with_fallback_quiet(invisible(vec_rbind(foobar(tibble::as_tibble(mtcars)),
+ mtcars, foobaz(mtcars))))
> with_fallback_quiet(invisible(vec_rbind(tibble::as_tibble(mtcars), foobar(
+   tibble::as_tibble(mtcars)))))
> with_fallback_quiet(invisible(vec_rbind(foobar(tibble::as_tibble(mtcars)),
+ mtcars, foobar(tibble::as_tibble(mtcars)))))
