summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorLemonBoy <LemonBoy@users.noreply.github.com>2018-10-12 08:50:28 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-10-12 08:50:28 +0200
commitfab4d38411d8f658a587bb34568fc9ec1887462e (patch)
tree01cc69a0f16e14cb12619256ec5a6e8eb5489b11 /tests
parent9b002e0d4f631dfcae9aa75b8d52fc58a3e8b4ff (diff)
downloadNim-fab4d38411d8f658a587bb34568fc9ec1887462e.tar.gz
string to string conversion keeps the dest type (#9323)
Fixes #9322
Diffstat (limited to 'tests')
-rw-r--r--tests/distinct/t9322.nim12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/distinct/t9322.nim b/tests/distinct/t9322.nim
new file mode 100644
index 000000000..2501d7fc7
--- /dev/null
+++ b/tests/distinct/t9322.nim
@@ -0,0 +1,12 @@
+discard """
+  output: apr
+"""
+
+type Fix = distinct string
+
+proc `$`(f: Fix): string {.borrow.}
+
+proc mystr(s: string) =
+  echo s
+
+mystr($Fix("apr"))