In particular, this comment has a work-around:

https://github.com/JuliaLang/julia/issues/269#issuecomment-68421745

On Saturday, August 22, 2015, Stefan Karpinski <ste...@karpinski.org> wrote:

> https://github.com/JuliaLang/julia/issues/269
>
> On Sat, Aug 22, 2015 at 1:33 AM, Paul Thompson <pm...@case.edu
> <javascript:_e(%7B%7D,'cvml','pm...@case.edu');>> 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
>>
>
>

Reply via email to