Hi @ChrisRackauckas

Sorry, it is a part of a bigger code and I maybe misunderstood the real problem. See this other code:

```
VERSION >= v"0.4.0-dev+6521" && __precompile__()
module TestConst
export test
# Earth Equatorial radius [m].
const R0 = 6378137.0
# Standard gravitational parameter for Earth [m^3/s^2].
const m0 = 3.986004418e14
# Perturbation terms based on EGM-08 standard gravitational model [1, pp. 1039].
const J2 = 1.08262617385222e-3
# Earth's orbit mean motion [rad/s]
const ne = (360.0/365.2421897)*pi/180/86400
function test(n::Number, e::Number)
# Check if the arguments are valid.
if (n <= 0)
throw(ArgumentError("The angular velocity must be greater than 0."))
end
if !( 0. <= e < 1. )
throw(ArgumentError("The eccentricity must be within the interval 0 <= e < 1."))
end
# Auxiliary variables.
sqrt_m0 = sqrt(m0)
sqrt_e2 = sqrt(1-e^2)
# Auxiliary constant to compute the functions.
K1 = 3.0*R0^2*J2*sqrt_m0/(4.0*(1-e^2)^2)
# Declare the functions that must solved for 0.
f1(a, i) = ne + 2.0*K1*a^(-3.5)*cos(i)
a_k::Float64 = (m0/n^2)^(1/3)
i_k::Float64 = acos( -ne*a_k^(3.5)/(2*K1) )
f1(a_k, i_k)
end
end
```

In this case, it is not correcting guessing the return value:

```
return $(Expr(:invoke, MethodInstance for (::TestConst.#f1#1)(::Float64, ::Float64), :(f1), SSAValue(1), :(i_k)))
end::Any
```

On the other hand, if I remove `K1`

from the function `f(a,i)`

, then it works:

```
return $(Expr(:invoke, MethodInstance for (::TestConst.#f1#1)(::Float64, ::Float64), :(f1), SSAValue(0), SSAValue(1)))
end::Float64
```

**NOTE**: I know that I can always do `K1::Float64`

, but I want to avoid that.