See http://docs.julialang.org/en/release-0.3/manual/faq/#how-should-i-declare-abstract-container-type-fields
On Fri, Oct 2, 2015 at 6:06 PM, Christopher Alexander <[email protected]> wrote: > Hello all, > > I am trying to figure out what I'm doing wrong with the creation of a > composite type, as below: > > abstract MyType > > type MySpecificType <: MyType > > type TestTypes > type_test::MyType > end > > testing = MySpecificType > > x = TestTypes(testing) > > > After running the above, I get a MethodError: > > ERROR: MethodError: `convert` has no method matching > convert(::Type{MyType}, ::Type{MySpecificType}) > This may have arisen from a call to the constructor MyType(...), > since type constructors fall back to convert methods. > Closest candidates are: > call{T}(::Type{T}, ::Any) > convert{T}(::Type{T}, ::T) > in call at none:2 > > Any ideas? > > Thanks! > > Chris >
