I’m perhaps not the best person to do so, but I reason about this as a case where one arg is more specific and the other arg is less specific. In this concrete case:

```
f(::Type{T}, ::T) where {T<:BitArray} = 1
f(::Type{BitArray}, ::Any) = 2
julia> f(BitArray, trues(3))
ERROR: MethodError: f(::Type{BitArray}, ::BitArray{1}) is ambiguous. Candidates:
f(::Type{BitArray}, ::Any) in Main at REPL[2]:1
f(::Type{T}, ::T) where T<:BitArray in Main at REPL[1]:1
Possible fix, define
f(::Type{BitArray}, ::BitArray)
```

In other circumstances, `::Type{BitArray}`

is more specific than `::Type{T} where {T <: BitArray}`

:

```
g(::Type{BitArray}) = 1
g(::Type{T}) where {T<:BitArray} = 2
julia> g(BitArray)
1
```

But the `::Any`

is less specific than the matching `::T`

. Thus we have an ambiguity — one argument is more specific but the other is less.