mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-21 06:45:27 +00:00
bugfix: tseqtuple
This commit is contained in:
@@ -49,6 +49,7 @@ tregex.nim;key: keyAYes!
|
||||
treguse.nim;055this should be the casehugh
|
||||
tromans.nim;success
|
||||
tseqcon.nim;Hithere, what's your name?Hathere, what's your name?
|
||||
tseqtuple.nim;fA13msg1falsefB14msg2truefC15msg3false
|
||||
tsets.nim;Ha ein F ist in s!
|
||||
tsidee2.nim;5
|
||||
tsidee3.nim;5
|
||||
|
||||
|
22
tests/accept/run/tseqtuple.nim
Executable file
22
tests/accept/run/tseqtuple.nim
Executable file
@@ -0,0 +1,22 @@
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user