I'd like to make a composite type that includes a dictionary as one of its named fields. But the obvious syntax doesn't work. I'm sure there's something fundamental that I don't understand. Here's an example:
type myType
x::Dict()
end
Julia says: type: myType: in type definition, expected Type{T<:Top}, got Dict{Any,Any}
which means, I'm guessing, that a dictionary is not a of Any
as any named field must be. But I'm not sure how to tell it what I mean.
I need an named field that is a dictionary. An inner constructor will initialize the dictionary.