# Something weird on Julia master

**URL:** <https://discourse.julialang.org/t/something-weird-on-julia-master/11076>\
**Category:** General Usage\
**Created:** [May 22, 2018, 3:57pm UTC](https://discourse.julialang.org/t/something-weird-on-julia-master/11076 "2018-05-22T15:57:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [May 22, 2018, 3:57pm UTC](https://discourse.julialang.org/t/something-weird-on-julia-master/11076/1 "2018-05-22T15:57:06Z")

</div>

Sorry for the little descriptive title, I really don’t know how to summarize this stuff which is driving me crazy.

While testing `Measurements.jl` on Julia master I ran into an issue. This is a minimal code reproducing the issue:

```julia
using Measurements

function test(x, a)
    T = Measurements.gettype(a)
    println(T)
    println(typeof(x))
    println(T(x))
    println(typeof(T(x)))
end

a = big"3.00000001" ± big"1e-17"
b = 3 ± 0.1
test(a.val, (a, b))

```

The output of this script is:

```julia
BigFloat
BigFloat
3.00000001
Float64

```

Thus, inside the `test` function `x` is a `BigFloat`, `T` is `BigFloat`, but `T(x)` is a `Float64`. Does anyone have a clue of what’s going on here? No problem in Julia 0.6. Also, no problem if I replace the call to `Measurements.gettype` with a hard-coded `BigFloat`.

---

<div class="post-metadata">

**Author:** ![ExpandingMan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/expandingman/32/866_2.png) [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)\
**Post date:** [May 22, 2018, 4:37pm UTC](https://discourse.julialang.org/t/something-weird-on-julia-master/11076/2 "2018-05-22T16:37:38Z")

</div>

This looks like some sort of constructor fallback issue, possibly related to the removal of default constructors in 0.7. It might be worth seeing if you can reproduce the error with a custom type to track down the problem in the simplest case.

---

<div class="post-metadata">

**Author:** ![simonbyrne](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/simonbyrne/32/19_2.png) [@simonbyrne](https://discourse.julialang.org/u/simonbyrne)\
**Post date:** [May 22, 2018, 5:42pm UTC](https://discourse.julialang.org/t/something-weird-on-julia-master/11076/3 "2018-05-22T17:42:57Z")

</div>

Seems to be an inference problem. I’ve opened an issue here (based on a simplified form): [https://github.com/JuliaLang/julia/issues/27204](https://github.com/JuliaLang/julia/issues/27204)
