The ambiguity is caused by promote_type(::Type{T}, ::Type{String})
. Since every type is a supertype of Union
(as it’s the bottom type in the type lattice), neither method is more specific than the other. I’d investigate/open an issue about why DataFrames
calls that promotion in the first place, it shouldn’t do that. WeakRefStrings
seems to be behaving correctly here, since their T
is restricted to being subtypes of their own type.