parent
69aeb86f49
commit
3659fec725
2 changed files with 17 additions and 11 deletions
|
|
@ -22,10 +22,18 @@ proc getSubsystem*[T](): ptr T {.
|
|||
let input: ptr Input = getSubsystem[Input]()
|
||||
|
||||
|
||||
# bug #4910
|
||||
# bugs #4910, #6892
|
||||
proc modify(x: var int) =
|
||||
x = 123
|
||||
|
||||
proc foo() =
|
||||
var ts: array[10, int]
|
||||
var ts: array[2, int]
|
||||
for t in mitems(ts):
|
||||
t = 123
|
||||
discard
|
||||
|
||||
for t in mitems(ts):
|
||||
modify(t)
|
||||
|
||||
for i, t in mpairs(ts):
|
||||
modify(t)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue