summary refs log tree commit diff stats
path: root/tests/accept/run/tcgbug.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/accept/run/tcgbug.nim')
-rw-r--r--tests/accept/run/tcgbug.nim17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/accept/run/tcgbug.nim b/tests/accept/run/tcgbug.nim
new file mode 100644
index 000000000..320821fb6
--- /dev/null
+++ b/tests/accept/run/tcgbug.nim
@@ -0,0 +1,17 @@
+
+type
+  TObj = object
+    x, y: int
+  PObj = ref TObj
+
+proc p(a: PObj) =
+  a.x = 0
+
+proc q(a: var PObj) =
+  a.p()
+
+var 
+  a: PObj
+new(a)
+q(a)
+