* Move typetraits.`$` to system. Fixes #5827. * revive PR; adjust code to make sure everything works and add tests * fix tests/concepts/tstackconcept.nim * address comments
This commit is contained in:
parent
eba8ffcf70
commit
0831292863
4 changed files with 44 additions and 25 deletions
|
|
@ -30,6 +30,20 @@ discard """
|
|||
'''
|
||||
"""
|
||||
|
||||
|
||||
block:
|
||||
const a2 = $(int)
|
||||
const a3 = $int
|
||||
doAssert a2 == "int"
|
||||
doAssert a3 == "int"
|
||||
|
||||
proc fun[T: typedesc](t: T) =
|
||||
const a2 = $(t)
|
||||
const a3 = $t
|
||||
doAssert a2 == "int"
|
||||
doAssert a3 == "int"
|
||||
fun(int)
|
||||
|
||||
# check high/low implementations
|
||||
doAssert high(int) > low(int)
|
||||
doAssert high(int8) > low(int8)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue