mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-02 11:12:37 +00:00
@@ -379,7 +379,7 @@ proc evalOp(m: TMagic, n, a, b, c: PNode; g: ModuleGraph): PNode =
|
||||
result = newStrNodeT(s, n, g)
|
||||
else:
|
||||
result = newStrNodeT(getStrOrChar(a), n, g)
|
||||
of mStrToStr: result = a
|
||||
of mStrToStr: result = newStrNodeT(getStrOrChar(a), n, g)
|
||||
of mEnumToStr: result = newStrNodeT(ordinalValToString(a, g), n, g)
|
||||
of mArrToSeq:
|
||||
result = copyTree(a)
|
||||
|
||||
12
tests/distinct/t9322.nim
Normal file
12
tests/distinct/t9322.nim
Normal 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"))
|
||||
Reference in New Issue
Block a user