summary refs log tree commit diff stats
path: root/tests/arc
diff options
context:
space:
mode:
authorClyybber <darkmine956@gmail.com>2020-10-16 18:03:01 +0200
committerGitHub <noreply@github.com>2020-10-16 18:03:01 +0200
commit66cd9c2e57de027781a11f4434112ab0e5cfea7b (patch)
tree620698861a6b00680e0b2de1462fac6b76a41968 /tests/arc
parent6b8baab536d25c744150e0190d2e172165faf92e (diff)
downloadNim-66cd9c2e57de027781a11f4434112ab0e5cfea7b.tar.gz
Fix #15599 (#15601)
* Fix #15599

* Add test
Diffstat (limited to 'tests/arc')
-rw-r--r--tests/arc/tarcmisc.nim14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/arc/tarcmisc.nim b/tests/arc/tarcmisc.nim
index b53d49df8..8d857921e 100644
--- a/tests/arc/tarcmisc.nim
+++ b/tests/arc/tarcmisc.nim
@@ -26,6 +26,7 @@ new line after - @['a']
 finalizer
 aaaaa
 hello
+ok
 closed
 destroying variable: 20
 destroying variable: 10
@@ -377,4 +378,15 @@ proc text_parser(xml: var XmlParser) =
   doAssert(test_passed)
 
 text_parser(xml)
-text_parser(xml2)
\ No newline at end of file
+text_parser(xml2)
+
+# bug #15599
+type
+  PixelBuffer = ref object
+
+proc newPixelBuffer(): PixelBuffer =
+  new(result) do (buffer: PixelBuffer):
+    echo "ok"
+
+discard newPixelBuffer()
+