I've been working on adding Unitful support to FiniteDifferences.jl in JuliaDiff/FiniteDifferences.jl#244, and ran into this issue when running the test suite of the package. The method
|
@inline unit(x::Type{T}) where {T <: Number} = NoUnits |
|
@inline unit(x::Type{Union{Missing, T}}) where T = unit(T) |
|
@inline unit(x::Type{Missing}) = missing |
on line 144 of
utils.jl is causing stack overflow, probably because of the methods immediately surrounding it. Why does this method exist, if we already have separate methods for
Missing and
T <: Any? To prefer
T != Missing, if it exists?
Anyways, here is the total output of the FiniteDifferences.jl test suite for reference: test.out.txt.
I've been working on adding Unitful support to FiniteDifferences.jl in JuliaDiff/FiniteDifferences.jl#244, and ran into this issue when running the test suite of the package. The method
Unitful.jl/src/utils.jl
Lines 143 to 145 in c1a9b4e
utils.jlis causing stack overflow, probably because of the methods immediately surrounding it. Why does this method exist, if we already have separate methods forMissingandT <: Any? To preferT != Missing, if it exists?Anyways, here is the total output of the FiniteDifferences.jl test suite for reference: test.out.txt.