Skip to content

Commit 74695d4

Browse files
authored
Merge pull request #9 from yuyichao/0.6
Fix 0.6 abstract type declaration depwarn
2 parents 7f9c22b + 3fe8c79 commit 74695d4

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

REQUIRE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
julia 0.5
2-
Compat 0.9.5
2+
Compat 0.17.0

src/AbstractTrees.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Base: getindex, setindex!, start, next, done, nextind, print, show,
1010
using Base: SizeUnknown
1111
using Compat
1212

13-
abstract AbstractShadowTree
13+
@compat abstract type AbstractShadowTree end
1414

1515
include("traits.jl")
1616
include("implicitstacks.jl")
@@ -267,7 +267,7 @@ eltype{I}(::Type{IndEnumerate{I}}) = Tuple{Any, eltype(I)}
267267

268268
# Tree Iterators
269269

270-
abstract TreeIterator{T}
270+
@compat abstract type TreeIterator{T} end
271271

272272
"""
273273
Iterator to visit the leaves of a tree, e.g. for the tree

src/implicitstacks.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
abstract ImplicitStack
1+
@compat abstract type ImplicitStack end
22
immutable ImplicitIndexStack{S} <: ImplicitStack
33
stack::Vector{S}
44
end
@@ -18,7 +18,7 @@ Base.isempty(s::ImplicitIndexStack) = isempty(s.stack)
1818
getnode(tree, ns::ImplicitIndexStack) = isempty(ns.stack) ? tree[rootstate(tree)] :
1919
(@assert isa(treekind(tree), IndexedTree); tree[ns.stack[end]])
2020
function getnode(tree, stack::ImplicitNodeStack)
21-
isempty(stack.node_stack) ?
21+
isempty(stack.node_stack) ?
2222
(isempty(stack.idx_stack) ? tree : children(tree)[stack.idx_stack.stack[end]]) :
2323
children(stack.node_stack[end])[stack.idx_stack.stack[end]]
2424
end

src/traits.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
abstract ParentLinks
1+
@compat abstract type ParentLinks end
22

33
"""
44
Indicates that this tree stores parent links explicitly. The implementation
@@ -11,7 +11,7 @@ immutable ImplicitParents <: ParentLinks; end
1111
parentlinks(::Type) = ImplicitParents()
1212
parentlinks(tree) = parentlinks(typeof(tree))
1313

14-
abstract SiblingLinks
14+
@compat abstract type SiblingLinks end
1515

1616
"""
1717
Indicates that this tree stores sibling links explicitly, or can compute them
@@ -27,7 +27,7 @@ siblinglinks(::Type) = ImplicitSiblings()
2727
siblinglinks(tree) = parentlinks(typeof(tree))
2828

2929

30-
abstract TreeKind
30+
@compat abstract type TreeKind end
3131
immutable RegularTree <: TreeKind; end
3232
immutable IndexedTree <: TreeKind; end
3333

@@ -38,7 +38,7 @@ children(tree, node, ::IndexedTree) = (tree[y] for y in childindices(tree, node)
3838
children(tree, node) = children(tree, node, treekind(tree))
3939

4040
function rootstate()
41-
end
41+
end
4242

4343
childindices(tree, node) =
4444
tree == node ? childindices(tree, rootstate(tree)) :

0 commit comments

Comments
 (0)