File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -357,11 +357,24 @@ struct RootedAliasTree
357
357
root:: Int
358
358
end
359
359
360
- AbstractTrees. childtype (:: Type{<:RootedAliasTree} ) = Union{RootedAliasTree, Int}
360
+ if Base. isdefined (AbstractTrees, :childtype )
361
+ AbstractTrees. childtype (:: Type{<:RootedAliasTree} ) = Union{RootedAliasTree, Int}
362
+ else
363
+ childtype (:: Type{<:RootedAliasTree} ) = Union{RootedAliasTree, Int}
364
+ end
361
365
AbstractTrees. children (rat:: RootedAliasTree ) = RootedAliasChildren (rat)
362
366
AbstractTrees. nodetype (:: Type{<:RootedAliasTree} ) = Int
363
- AbstractTrees. nodevalue (rat:: RootedAliasTree ) = rat. root
364
- AbstractTrees. shouldprintkeys (rat:: RootedAliasTree ) = false
367
+ if Base. isdefined (AbstractTrees, :nodevalue )
368
+ AbstractTrees. nodevalue (rat:: RootedAliasTree ) = rat. root
369
+ else
370
+ nodevalue (rat:: RootedAliasTree ) = rat. root
371
+ nodevalue (a) = a
372
+ end
373
+ if Base. isdefined (AbstractTrees, :shouldprintkeys )
374
+ AbstractTrees. shouldprintkeys (rat:: RootedAliasTree ) = false
375
+ else
376
+ shouldprintkeys (rat:: RootedAliasTree ) = false
377
+ end
365
378
has_fast_reverse (:: Type{<:AbstractSimpleTreeIter{<:RootedAliasTree}} ) = false
366
379
367
380
struct StatefulAliasBFS{T} <: AbstractSimpleTreeIter{T}
You can’t perform that action at this time.
0 commit comments