summary refs log tree commit diff stats
path: root/tests/ccgbugs/mymodule.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ccgbugs/mymodule.nim')
-rw-r--r--tests/ccgbugs/mymodule.nim14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ccgbugs/mymodule.nim b/tests/ccgbugs/mymodule.nim
new file mode 100644
index 000000000..8c78cdf9b
--- /dev/null
+++ b/tests/ccgbugs/mymodule.nim
@@ -0,0 +1,14 @@
+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
+  
\ No newline at end of file