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…