I'm trying to use view objects in 1.4 and devel. Even my simplest test cases are either crashing, returning bogus values, or triggering C compile errors. For example:
type Outer = object
value: int
type Inner = object
owner: var Outer
var o = Outer(value: 1234)
var v = Inner(owner: o).owner.value
echo "Got value = ", v
assert v == 1234
I just filed issue 15897 on this, and the issues 15884 and 15885 filed yesterday look very similar.
I have a good use case for a view object; does anyone know of a way to avoid these issues?