Struct which contains struct

Hey is it possible in Julia to create struct, which contains struct and this struct contains first struct. I guess it may be more obvious from example

struct A
    a::Float64
    b::B
end

struct B
    a::Float64
    b::A
end

Is it even possible (for example to declare struct first and then define it later) or is this unaccaptable in Julia.
Thanks for response

It’s currently not supported. See https://github.com/JuliaLang/julia/issues/269 which also contains some workarounds.

3 Likes