mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-13 06:43:52 +00:00
add testcase for mitems returning tuple on VM.
This commit is contained in:
committed by
Andreas Rumpf
parent
03b11b66cf
commit
f64eee3a1e
@@ -29,3 +29,17 @@ macro m: typed =
|
||||
result.add newCall(bindsym"echo", i)
|
||||
|
||||
m()
|
||||
|
||||
# bug 4741 & 5013
|
||||
proc test() =
|
||||
var s = [("baz", 42), ("bath", 42)]
|
||||
for i in s.mitems:
|
||||
i[1] = 3
|
||||
doAssert(s == [("baz", 3), ("bath", 3)])
|
||||
|
||||
static:
|
||||
test()
|
||||
var s = [("baz", 42), ("bath", 42)]
|
||||
for i in s.mitems:
|
||||
i[1] = 3
|
||||
doAssert(s == [("baz", 3), ("bath", 3)])
|
||||
|
||||
Reference in New Issue
Block a user