# Struct which contains struct

**URL:** https://discourse.julialang.org/t/struct-which-contains-struct/32060
**Category:** New to Julia
**Created:** [December 9, 2019, 5:53pm UTC](https://discourse.julialang.org/t/struct-which-contains-struct/32060 "2019-12-09T17:53:56Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ziziak](https://avatars.discourse-cdn.com/v4/letter/z/ecd19e/32.png) [@ziziak](https://discourse.julialang.org/u/ziziak)
#### Post date: [December 9, 2019, 5:53pm UTC](https://discourse.julialang.org/t/struct-which-contains-struct/32060/1 "2019-12-09T17:53:56Z")

</div>

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

```julia
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

---

<div class="post-metadata">

### Author: ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)
#### Post date: [December 9, 2019, 6:20pm UTC](https://discourse.julialang.org/t/struct-which-contains-struct/32060/2 "2019-12-09T18:20:42Z")

</div>

It’s currently not supported. See [handle mutually-circular type declarations · Issue #269 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/issues/269) which also contains some workarounds.
