# Distribution in 1.4.2?

I am converting a lot between distributions. In Julia 1.2 , this code worked perfectly:

``````Logistic(p::Logistic) = p;
Normal(p::Normal) = p;
Gumbel(p::Gumbel) = p;

Logistic(p::Gumbel) = (ξ=0.68; Logistic(p.μ-p.θ*log(log(2)),p.θ*ξ));
Gumbel(p::Logistic) = (ξ=0.68; Gumbel(p.μ+p.θ*log(log(2))/ξ,p.θ/ξ));

Normal(p::Logistic) = (ξ=1/1.6; Normal(p.μ,p.θ/ξ)); #
Logistic(p::Normal) = (ξ=1/1.6; Logistic(p.μ,p.σ*ξ));

Normal(p::Gumbel) = (ξ=1; Normal(p.μ-p.θ*log(log(2))/ξ,p.θ*ξ));
Gumbel(p::Normal) = (ξ=1; Gumbel(p.μ+p.σ*log(log(2))/ξ,p.σ/ξ));
``````

Suddenly, in Julia 1.4.2, it is broken. I get the error

`ArgumentError: invalid type for argument p in method definition for Normal at In[10]:3`

Any help would be highly appreciated. It may generally be a good feature for univariate distributions…

This code works fine for me in the Julia 1.4.2 REPL after `using Distributions`. How did you run it when you got the error?

This code works fine for me in the Julia 1.4.2 REPL after `using Distributions`. How did you run it when you got the error?

When I run it once on a clean memory, it works. If I run it again, it
does not. But I learned
an easy fix:

using Distributions
import Distributions.Logistic
import Distributions.Normal
import Distributions.Gumbel