mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
19 lines
330 B
Nim
19 lines
330 B
Nim
discard """
|
|
targets: "c js"
|
|
matrix: "--mm:refc; --mm:orc"
|
|
"""
|
|
import std/assertions
|
|
|
|
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()
|