Note that Vector Vector{Belief} Vector{Belief{DistributionType}} Vector{Belief{D}} # for some D<: DistributionType
are all different types. Your z is a Vector{Belief}, where Belief, without parameters, is an abstract type. For any D<:DistributionType , Belief{D} is a concrete type, even if D itself is abstract, as in Belief{DistributionType} You're function is written to only accept arguments of the form Vector{Belief{D}} , whereas you are trying to execute it with an argument of type Vector{Belief}, which is different. I think you want you're signature to be function Testa{B<:Belief}(basin::Vector{B}) "Test" end which will accept both arguments of type Vector{Belief} and Vector{Belief{D}}. Hope this helps. Op zaterdag 4 oktober 2014 00:43:55 UTC+2 schreef Zenna Tavares: > > I am getting type failures when dealing with vectors parametric types, and > I am not sure of the reason. > > z = Belief[a,b] > function Testa{D <: DistributionType}(basin::Vector{Belief{D}}) > "Test" > end > > > Testa(z) > > typeof(z) > > yields > > Array{Belief{D<:DistributionType},1} > > Which is as far as I can see is the signature of the function. But I get > the Testa has no method matching > > Testa(::Array{Belief{D<:DistributionType},1}) > > What am I doing wrong? >