I didn't find a bug report for this elsewhere. I'm on 1.3.1 with Mac OS Catalina
julia> allunique(('a':1:'c')[1:2])
ERROR: MethodError: no method matching zero(::Type{Char})
Closest candidates are:
zero(::Type{Missing}) at missing.jl:103
zero(::Type{LibGit2.GitHash}) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.3/LibGit2/src/oid.jl:220
zero(::Type{Pkg.Resolve.VersionWeights.VersionWeight}) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.3/Pkg/src/resolve/VersionWeights.jl:19
...
Adding following to set.jl fixes the bug:
allunique(r::StepRangeLen{T,R,S}) where {T,R,S} = (step(r) != zero(S)) || (length(r) <= 1)
because there is no zero for Char in the AbstractRange{Char} fallback. (I'm traveling so no time for a PR...)
That seems like the right fix here. The failing case make a natural test to add.
Most helpful comment
Adding following to set.jl fixes the bug:
because there is no
zeroforCharin theAbstractRange{Char}fallback. (I'm traveling so no time for a PR...)