我该如何解决这个问题?
mutable struct Parent
name::String
children::Vector{Child}
function Parent(name)
return new(name)
end
end
mutable struct Child
name::String
parent::Parent
function Child(name)
return new(name)
end
end
parent = Parent("father")
child = Child("son")
会产生一个错误
加载错误:未定义变量错误:Child未定义
有没有办法处理这种情况?