Files
Nim/tests/ccgbugs/mymodule.nim
2018-03-23 13:28:22 +01:00

14 lines
245 B
Nim

type
MyRefObject* = ref object
s: string
BaseObj* = ref object of RootObj
ChildObj* = ref object of BaseObj
proc newMyRefObject*(s: string): MyRefObject =
new(result)
result.s = s
proc `$`*(o: MyRefObject): string =
o.s