The documentation for Set
says:
Elements in a Set are unique, as determined by the elements’ definition of isequal.
This doesn’t seem to be true:
struct S
x::Vector{Int}
S() = new(Int[])
end
Base.isequal(::S, ::S) = true
@assert isequal(S(), S())
@assert Set([S()]) == Set([S(), S()]) # error
@assert length(Set([S()])) == length(Set([S(), S()])) # error
Am I missing something?