Skip to content

Commit 583edea

Browse files
authored
Merge pull request JuliaCollections#125 from sjkelly/sjk/qa1
Fix method ambiguities
2 parents 781a01d + b312497 commit 583edea

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

Project.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ version = "0.4.3"
77
julia = "1"
88

99
[extras]
10+
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
1011
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1112

1213
[targets]
13-
test = ["Test"]
14+
test = ["Aqua", "Test"]

src/AbstractTrees.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export ParentLinks, StoredParents, ImplicitParents
3030
export SiblingLinks, StoredSiblings, ImplicitSiblings
3131
export ChildIndexing, IndexedChildren, NonIndexedChildren
3232
export NodeType, HasNodeType, NodeTypeUnknown
33-
export nodetype, nodevalue, nodevalues, children, parentlinks, siblinglinks, childindexing, childtype, childrentype
33+
export nodetype, nodevalue, nodevalues, children, childtype, childrentype
3434
#extended interface
3535
export nextsibling, prevsibling
3636

src/cursors.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,7 @@ TreeCursor(::HasNodeType, ::IndexedChildren, ::ParentLinks, ::SiblingLinks, node
364364
TreeCursor(::HasNodeType, ::NonIndexedChildren, ::ParentLinks, ::SiblingLinks, node) = StableCursor(node)
365365

366366
TreeCursor(::NodeTypeUnknown, ::IndexedChildren, ::ParentLinks, ::SiblingLinks, node) = IndexedCursor(node)
367+
TreeCursor(::NodeTypeUnknown, ::IndexedChildren, ::ImplicitParents, ::StoredSiblings, node) = IndexedCursor(node)
367368

368369
TreeCursor(::NodeTypeUnknown, ::ChildIndexing, ::StoredParents, ::StoredSiblings, node) = TrivialCursor(node)
369370

src/iteration.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Base.eltype(ti::TreeIterator) = eltype(typeof(ti))
7070

7171
Base.IteratorSize(::Type{<:TreeIterator}) = SizeUnknown()
7272

73-
function Base.iterate(ti::TreeIterator, s::Union{Nothing,IteratorState}=initial(statetype(ti), ti.root))
73+
function Base.iterate(ti::TreeIterator, s=initial(statetype(ti), ti.root))
7474
isnothing(s) && return nothing
7575
(nodevalue(s.cursor), next(s))
7676
end

test/runtests.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
using AbstractTrees, Test
2-
2+
using Aqua
33

44
@testset "Builtins" begin include("builtins.jl") end
55
@testset "Custom tree types" begin include("trees.jl") end
66
if Base.VERSION >= v"1.6"
77
# Printing tests use `findall` variants that are not supported on Julia 1.0
88
@testset "Printing" begin include("printing.jl") end
99
end
10+
11+
Aqua.test_all(AbstractTrees)

0 commit comments

Comments
 (0)