It is not currently possible for a type to have multiple direct supertypes.
You might be interested in the Traits package: https://github.com/mauro3/Traits.jl If you don't want to add a dependency, you can use the "traits trick" directly, which seems to have first been described here: https://github.com/JuliaLang/julia/issues/2345#issuecomment-54537633 Base uses this strategy right now to decide how to iterate over subtypes of AbstractArrays based on whether the linearindexing function returns LinearFast or LinearSlow for the type. https://github.com/JuliaLang/julia/search?utf8=%E2%9C%93&q=LinearFast On Monday, April 4, 2016 at 8:54:24 AM UTC-4, Martin Kuzma wrote: > > Hi, since abstract types cant have any fields I think of them as > interfaces. I want to specify that a type is subtype of more than one > supertype. > I tried this: > > abstract A > > abstract B > > type T <: A, B end > > But I cant do that. Is it even possible to do? Am I using a wrong syntax? > Martin. >
