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 handle mutually-circular type declarations · Issue #269 · JuliaLang/julia · GitHub which also contains some workarounds.

3 Likes