* remove unnecessary when statement * remove outdated codes * close #15563 * Update tests/typerel/t15563.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * address comments * tiny Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
This commit is contained in:
parent
6278b5d89a
commit
cbe3c993b6
1 changed files with 18 additions and 0 deletions
18
tests/stdlib/tvarargs.nim
Normal file
18
tests/stdlib/tvarargs.nim
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
discard """
|
||||
targets: "c js"
|
||||
matrix: "--gc:refc; --gc:arc"
|
||||
"""
|
||||
|
||||
|
||||
template main =
|
||||
proc hello(x: varargs[string]): seq[string] =
|
||||
var s: seq[string]
|
||||
s.add x
|
||||
s
|
||||
|
||||
doAssert hello() == @[]
|
||||
doAssert hello("a1") == @["a1"]
|
||||
doAssert hello("a1", "a2") == @["a1", "a2"]
|
||||
|
||||
static: main()
|
||||
main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue