add tests for recently closed issues (#10722)
This commit is contained in:
parent
ea409fb15a
commit
e7878c0d08
9 changed files with 177 additions and 1 deletions
21
tests/types/tcast1.nim
Normal file
21
tests/types/tcast1.nim
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
discard """
|
||||
output: '''
|
||||
@[1.0, 2.0, 3.0]
|
||||
@[1.0, 2.0, 3.0]
|
||||
'''
|
||||
"""
|
||||
|
||||
# bug #6406
|
||||
|
||||
import sequtils
|
||||
|
||||
proc remap1(s: seq[int], T: typedesc): seq[T] =
|
||||
s.map do (x: int) -> T:
|
||||
x.T
|
||||
|
||||
proc remap2[T](s: seq[int], typ: typedesc[T]): seq[T] =
|
||||
s.map do (x: int) -> T:
|
||||
x.T
|
||||
|
||||
echo remap1(@[1,2,3], float)
|
||||
echo remap2(@[1,2,3], float)
|
||||
Loading…
Add table
Add a link
Reference in a new issue