When I try to create two objects, where the second object has a reference to the first, I get Error: invalid type: 'var Foo' in this context: 'Bar' for var
:
type
Foo = object
x: int
type
Bar = object
foo: var Foo
var f = Foo(x: 10)
var b = Bar(foo: f)
https://play.nim-lang.org/#ix=3RG3
How do I get this to work?