summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/arc/t19862.nim13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/arc/t19862.nim b/tests/arc/t19862.nim
new file mode 100644
index 000000000..f7146ec26
--- /dev/null
+++ b/tests/arc/t19862.nim
@@ -0,0 +1,13 @@
+discard """
+  matrix: "--gc:refc; --gc:arc"
+"""
+
+# bug #19862
+type NewString = object
+
+proc len(s: NewString): int = 10
+
+converter toNewString(x: WideCStringObj): NewString = discard
+
+let w = newWideCString("test")
+doAssert len(w) == 4