Type problem

I have the method

plotCDFComparison(p::Union{Type{Gumbel}, Type{Laplace}, Type{Logistic}, Type{Normal}})
    ...
end

but when I run it as

plotCDFComparison(Normal(μ,σ));

I get an error

MethodError: no method matching plotCDFComparison(::Normal{Float64})
Closest candidates are:
  plotCDFComparison(!Matched::Union{Type{Gumbel}, Type{Laplace}, Type{Logistic}, Type{Normal}}) at In[8]:2

Does any of you understand why it does not get this right? It must have to do with the Float64 but I don’t get how to fix it!

You are dispatching on types as values above. You are probably looking for p::Union{Normal,...} but it is hard to say without a self-contained example.

2 Likes