While re-reading the manual I realized that isleaftype should probably be renamed to either isconcretetype or isconcrete:
julia> abstract Foo
julia> abstract Bar <: Foo
julia> type Baz <: Foo
end
julia> isleaftype(Bar) # One could consider Bar a leaf type but not concrete
false
julia> isleaftype(Baz)
true
The documentation for isleaftype does clearly explain it returns true for concrete types which seems like the function name is slightly misleading.
While re-reading the manual I realized that
isleaftypeshould probably be renamed to eitherisconcretetypeorisconcrete:The documentation for
isleaftypedoes clearly explain it returns true for concrete types which seems like the function name is slightly misleading.