On Tuesday, October 20, 2015 at 10:09:42 AM UTC-4, Glen O wrote:
>
> Seems to be something wrong with the dispatch system with Union...
>
Yes, Unions with TypeVars can behave strangely when the elements aren't
mutually exclusive. I think it's just greedily matching the first thing it
can. In this case it's always matching the `T` in `Union{T,
AbstractArray{T}}` to the type of the very first argument, and then
applying that to the remaining arguments, which explains why it works with
a scalar first argument.