Thank you. Tim's solution on the issue page works well for me.
On Saturday, August 22, 2015 at 8:43:44 PM UTC-4, Kevin Squire wrote: > > In particular, this comment has a work-around: > > https://github.com/JuliaLang/julia/issues/269#issuecomment-68421745 > > On Saturday, August 22, 2015, Stefan Karpinski <[email protected] > <javascript:>> wrote: > >> https://github.com/JuliaLang/julia/issues/269 >> >> On Sat, Aug 22, 2015 at 1:33 AM, Paul Thompson <[email protected]> wrote: >> >>> Hi: >>> >>> I want to define two types, and each will have a field that is the other >>> type. For instance: >>> >>> type Foo >>> bar::Bar >>> otherfield1 >>> otherfield2 >>> end >>> >>> type Bar >>> foo::Foo >>> otherfield1 >>> otherfield2 >>> end >>> >>> >>> The above results in an error when defining Foo because Bar is not >>> defined. I could make the types parametric, and do something like Foo{T}, >>> but I really don't need to, because that field will always be a Bar in my >>> application. This is kind of an odd self-referential like problem, but at >>> the definition step rather than initialization. >>> >>> Is there a way for Julia to know that the definition of the yet >>> undefined type is on the way? >>> >>> Thanks, >>> >>> Paul >>> >> >>
