mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 09:24:36 +00:00
* remove echo statements * Update tests/vm/triangle_array.nim * Update tests/vm/tyaytypedesc.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
14 lines
305 B
Nim
14 lines
305 B
Nim
const
|
|
foo = @["aaa", "bbb", "ccc"]
|
|
|
|
proc myTuple: tuple[n: int, bar: seq[string]] =
|
|
result.n = 42
|
|
result.bar = newSeqOfCap[string](foo.len)
|
|
for f in foo:
|
|
result.bar.add(f)
|
|
|
|
# It works if you change the below `const` to `let`
|
|
const
|
|
(n, bar) = myTuple()
|
|
|
|
doAssert bar == @["aaa", "bbb", "ccc"] |