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.nim12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ccgbugs/mymodule.nim b/tests/ccgbugs/mymodule.nim
new file mode 100644
index 000000000..d3306ec49
--- /dev/null
+++ b/tests/ccgbugs/mymodule.nim
@@ -0,0 +1,12 @@
+type
+  MyRefObject* = ref object
+    s: string
+
+
+proc newMyRefObject*(s: string): MyRefObject =
+  new(result)
+  result.s = s
+  
+proc `$`*(o: MyRefObject): string =
+  o.s
+  
\ No newline at end of file