summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorflywind <43030857+xflywind@users.noreply.github.com>2022-06-09 22:51:17 +0800
committerGitHub <noreply@github.com>2022-06-09 16:51:17 +0200
commit1972005439306a12088400ef338c40c3d3c2ce28 (patch)
treeba0053a84e4c60f258eaf18ad089d1e778449d6d /tests
parent25d89269eb7fe7ebed142f2d3136959db11c9f02 (diff)
downloadNim-1972005439306a12088400ef338c40c3d3c2ce28.tar.gz
fix #19862; make widestrs consistent between refc and orc (#19874) [backport]
fix #19862; make widestrs consistent in refc and orc
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