A quick search turns up isleaftype, which seems to do exactly the opposite of what you want:
isleaftype(AbstractArray) => false isleaftype(Array{Int, 2}) => true Hope that helps. On 21 May 2014 20:15, Stephen Chisholm <sbchish...@gmail.com> wrote: > Is there a way to check if a given DataType is an abstract type? I've > come up with a crude method below but thought there should be a better way. > > > function isabstract(t::DataType) > try > t() > catch exception > return (typeof(exception) == ErrorException && > string(exception.msg) == "type cannot be constructed") > end > return false > end > > > Cheers, Steve >