Hi I am wondering what to do when two structs are dependent on each other. For example
module PolulationGenerator
mutable struct Person
id::Integer
age::Integer
current_location::Union{Place, nothing}
end
mutable Struct Place
person::Person
is_family::Bool
end
end
Here both the struts depend on each other as Person
has field “current_location” of type Place
. While struct Place
takes in field “person” of type Person
. I am unable to place one struct over the other as they are both have fields of Type of each other. What should I do with a problem like this. I get the error UndefVarError" Place not defined