tibble() gives inconsistent error message for duplicate column names. See the following reprex:
library(tibble)
tibble(x1 = 1, x1 = 1)
#> Error: Column `x1` must have a unique name
tibble(x2 = 2, x1 = 1, x1 = 1)
#> Error: Column `x1` must have a unique name
tibble(x1 = 1, x1 = 1, x2 = 2)
#> Error: Data source must be a dictionary
Note that the last error message is different from the previous error messages, even though the cause of the error is identical.
I tested this with the latest GitGub version of the tibble package.