(Accidentally deleted OP, so I'm hijacking this post)
I was looking for a workaround for the segfault in the latest nim compiler caused by the following code:
type
Obj = ref object
close: proc(o: Obj)
And found this:
type
Container = tuple[o: Obj]
Obj = ref object
close: proc(o: Container)
It seems to solve the problem for now. Any more information about this problem would be great, though.
Create a ref type that's separate from the object type.
type
ObjInner = object
close: proc(o: Obj)
Obj = ref ObjInner