summary refs log tree commit diff stats
path: root/tests/arc/t19862.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/arc/t19862.nim')
-rw-r--r--tests/arc/t19862.nim15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/arc/t19862.nim b/tests/arc/t19862.nim
new file mode 100644
index 000000000..6d3f57692
--- /dev/null
+++ b/tests/arc/t19862.nim
@@ -0,0 +1,15 @@
+discard """
+  matrix: "--gc:refc; --gc:arc"
+"""
+
+import std/widestrs
+
+# 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