Skip to content

Commit 702b814

Browse files
committed
Merge pull request #72 from sjkelly/sjk/next-fixes1
fix Union() deprecation warning on 0.4
2 parents f79c41b + 9f9501c commit 702b814

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/Reactive.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
module Reactive
22

3+
using Compat
4+
35
include("core.jl")
46
include("operators.jl")
57
include("async.jl")

src/deprecation.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Base: consume, foldl, @deprecate
22
export lift, consume, foldl, keepwhen, keepif, dropif, dropwhen
33

44
@deprecate lift(f, s::Signal...; kwargs...) map(f,s...; kwargs...)
5-
@deprecate consume(f::Union(Function, DataType), s::Signal...;kwargs...) map(f, s...;kwargs...)
5+
@deprecate consume(f::@compat(Union{Function, DataType}), s::Signal...;kwargs...) map(f, s...;kwargs...)
66
@deprecate foldl(f, x, s::Signal...;kwargs...) foldp(f, x, s...;kwargs...)
77
@deprecate keepwhen filterwhen
88
@deprecate keepif filter

src/finalize_compat.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const _node_finalizers = WeakKeyDict()
22

3-
typealias Finalizer Union(Ptr, Function)
3+
typealias Finalizer @compat Union{Ptr, Function}
44

55
const _finalizer = Base.finalizer
66
finalizer(x::Node, f::Finalizer) = begin

src/operators.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function _map(f, inputs::Node...;
2222
end
2323

2424
# julia 0.3 loses it if this method doesn't exist
25-
map(f::Union(Function, DataType), inputs::Node...; kwargs...) =
25+
map(f::@compat(Union{Function, DataType}), inputs::Node...; kwargs...) =
2626
_map(f, inputs...; kwargs...)
2727

2828
map(f, inputs::Node...; kwargs...) =

src/time.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
using Compat
2-
31
export every, fps, fpswhen, throttle
42

53
# Aggregate a signal producing an update at most once in dt seconds

0 commit comments

Comments
 (0)