Not possible. See this issue where it has been discussed: https://github.com/JuliaLang/julia/issues/5. I think traits (mauro3/Traits.jl) could be helpful for you (just a guess, don't know trait specifics atm)
- [julia-users] possibility to define a type that is subtype o... Martin Kuzma
- [julia-users] Re: possibility to define a type that is ... Jason Merrill
- [julia-users] Re: possibility to define a type that is ... Hans-Peter
