Hi, I’m a bit confused about the following outer constructor method call.
mutable struct OSMData
nodes::Dict{Int, OpenStreetMapX.LLA}
ways::Vector{OpenStreetMapX.Way}
relations::Vector{OpenStreetMapX.Relation}
features::Dict{Int, Tuple{String,String}}
bounds::OpenStreetMapX.Bounds
way_tags::Set{String}
relation_tags::Set{String}
end
OSMData() = OSMData(Dict{Int, OpenStreetMapX.LLA}(), Vector{OpenStreetMapX.Way}(),
Vector{OpenStreetMapX.Relation}(), Dict{Int, String}(),
Bounds(0.0, 0.0, 0.0, 0.0), Set{String}(), Set{String}())
My question is, for the feature attribute of this outer constructor method, the parameter is
Dict{Int, String}()
. On the other hand, the definition of the struct OSMData requires that the type of the features attribute is Dict{Int, Tuple{String,String}}
. Can anyone please let me know why it still works out well in this case.