We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
allunique
1 parent 0af99e6 commit fe82988Copy full SHA for fe82988
base/set.jl
@@ -549,8 +549,8 @@ function allunique(A::StridedArray)
549
if length(A) < 32
550
_indexed_allunique(A)
551
elseif OrderStyle(eltype(A)) === Ordered()
552
- a1, rest1 = Iterators.peel(A)
553
- a2, rest = Iterators.peel(rest1)
+ a1, rest1 = Iterators.peel(A)::Tuple{Any,Any}
+ a2, rest = Iterators.peel(rest1)::Tuple{Any,Any}
554
if !isequal(a1, a2)
555
compare = isless(a1, a2) ? isless : (a,b) -> isless(b,a)
556
for a in rest
test/sets.jl
@@ -644,6 +644,7 @@ end
644
@test !allunique((NaN, NaN))
645
# Known length 1, need not evaluate:
646
@test allunique(error(x) for x in [1])
647
+ # @test_opt allunique(Int[])
648
end
649
650
@testset "allunique(f, xs)" begin
0 commit comments