diff options
author | LemonBoy <LemonBoy@users.noreply.github.com> | 2018-10-12 08:50:28 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-10-12 08:50:28 +0200 |
commit | fab4d38411d8f658a587bb34568fc9ec1887462e (patch) | |
tree | 01cc69a0f16e14cb12619256ec5a6e8eb5489b11 /tests | |
parent | 9b002e0d4f631dfcae9aa75b8d52fc58a3e8b4ff (diff) | |
download | Nim-fab4d38411d8f658a587bb34568fc9ec1887462e.tar.gz |
string to string conversion keeps the dest type (#9323)
Fixes #9322
Diffstat (limited to 'tests')
-rw-r--r-- | tests/distinct/t9322.nim | 12 |
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")) |