Complex{AbstractFloat}: Not working as intended

Use foo(parameter::Complex{<:AbstractFloat}) or foo(parameter::Complex{T}) where T<:AbstractFloat
The reason your original signature does not work is that

julia> Complex{Float64} <: Complex{AbstractFloat}
false

See Types · The Julia Language and in particular the yellow box in that section :slight_smile:

7 Likes