This commit is contained in:
Araq 2015-07-23 17:18:36 +02:00
commit 4932415742
3 changed files with 28 additions and 3 deletions

View file

@ -0,0 +1,16 @@
discard """
output: '''@[5, 5, 5]'''
"""
# bug #1832
var s = @[5]
# Works fine:
let x = s[s.high]
s.add x
# Causes the 0 to appear:
s.add s[s.high]
echo s # @[5, 5, 0]