The following code results in a compiler error.
type
Base[T] = ref object of RootObj
value: T
Child = Base[int]
proc newChild*(): Child =
result = Child()
However if Base[T] isn't a ref, it compiles.
type
Base[T] = object of RootObj
value: T
Child = Base[int]
proc newChild*(): Child =
result = Child()
The issue exists in 10.2 as well as the current devel branch.
Seems like it may be related to this bug but I'm not sure. Any thoughts?
Thanks!