Skip to content

Commit

Permalink
deprecate union()
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Aug 5, 2017
1 parent cb82e11 commit 5d6adbf
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions base/deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1334,6 +1334,8 @@ end

@deprecate issubtype (<:)

@deprecate union() Set()

# 12807
start(::Union{Process, ProcessChain}) = 1
done(::Union{Process, ProcessChain}, i::Int) = (i == 3)
Expand Down
1 change: 0 additions & 1 deletion base/set.jl
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ done(s::Set, state) = done(s.dict, state)
# NOTE: manually optimized to take advantage of Dict representation
next(s::Set, i) = (s.dict.keys[i], skip_deleted(s.dict, i+1))

union() = Set()
union(s::Set) = copy(s)
function union(s::Set, sets::Set...)
u = Set{join_eltype(s, sets...)}()
Expand Down
1 change: 0 additions & 1 deletion test/sets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ for data_in in ((7,8,4,5),
end

# union
@test isequal(union(),Set())
@test isequal(union(Set([1])),Set([1]))
s = (Set([1,2]), Set([3,4]))
@test isequal(s, Set([1,2,3,4]))
Expand Down

0 comments on commit 5d6adbf

Please sign in to comment.