string to string conversion keeps the dest type (#9323)

Fixes #9322
This commit is contained in:
LemonBoy 2018-10-12 08:50:28 +02:00 • committed by Andreas Rumpf
commit fab4d38411
2 changed files with 13 additions and 1 deletions

12
tests/distinct/t9322.nim Normal file
View file

@ -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"))