dispatch failure depending on order of imports #48295
Labels
bug
Indicates an unexpected problem or unintended behavior
types and dispatch
Types, subtyping and method dispatch
I encountered an interesting situation in JuliaMath/QuadGK.jl#63. If I run the following code:
in Julia 1.8.2 (x86_64-apple-darwin21.4.0, QuadGK 2.6.0, and Unitful v1.12.2) then it works fine, but if I change the order of the
using
statements:then it gives a bizarre
MethodError
:And note from the stacktrace that it is calling this fallback method of
one(T)
, which should not be the case. It should be calling theone
method in Unitful.jl:Seems like there is some kind of stale code where it is calling
one
from an old version (an old "world age") of the method table?The text was updated successfully, but these errors were encountered: