summary refs log tree commit diff stats
path: root/tests/accept/run/tseqtuple.nim
blob: 7ef92f7f13d49f14d1fcc03348d86a07bb8f00cb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
discard """
  file: "tseqtuple.nim"
  output: "fA13msg1falsefB14msg2truefC15msg3false"
"""

type
  TMsg = tuple[
    file: string,
    line: int,       
    msg: string,
    err: bool]

var s: seq[TMsg] = @[]

s.add(("fA", 13, "msg1", false))
s.add(("fB", 14, "msg2", true))
s.add(("fC", 15, "msg3", false))

for file, line, msg, err in items(s):
  stdout.write(file)
  stdout.write($line)
  stdout.write(msg)
  stdout.write($err)

#OUT fA13msg1falsefB14msg2truefC15msg3false