beacon-biosignals / TimeSpans.jl

A Julia package that provides a `TimeSpan` type for representing a continuous span between two points in time.
Other
6 stars 2 forks source link

Julia 1.7 support #22

Closed palday closed 2 years ago

palday commented 2 years ago

With Julia 1.7, there is a new method ambiguity:

  Expression: findall((in)(TimeSpan(1, 10)), map(Nanosecond, (9, 10, 11))) == 1:1
  MethodError: findall(::Base.Fix2{typeof(in), TimeSpan}, ::Tuple{Nanosecond, Nanosecond, Nanosecond}) is ambiguous. Candidates:
    findall(pred::Base.Fix2{typeof(in)}, x::Tuple) in Base at array.jl:2427
    findall(pred::Base.Fix2{typeof(in), TimeSpan}, obj::Union{Tuple, AbstractArray}) in TimeSpans at /home/phillip/Work/TimeSpans.jl/src/TimeSpans.jl:49
  Possible fix, define
    findall(::Base.Fix2{typeof(in), TimeSpan}, ::Tuple)