[bugfix] fixes #11524

This commit is contained in:
Andreas Rumpf 2019-06-22 01:52:49 +02:00
commit 79c721d418
3 changed files with 40 additions and 5 deletions

View file

@ -6,7 +6,8 @@ ha
@["arg", "asdfklasdfkl", "asdkfj", "dfasj", "klfjl"]
@[1, 2, 3]
@["red", "yellow", "orange", "rtrt1", "pink"]
30 30'''
a: @[4, 2, 3]
35 35'''
"""
import allocators
@ -169,6 +170,14 @@ proc testWarm =
testWarm()
proc mutConstSeq() =
# bug #11524
var a = @[1,2,3]
a[0] = 4
echo "a: ", a
mutConstSeq()
#echo s
let (a, d) = allocCounters()
discard cprintf("%ld %ld\n", a, d)

View file

@ -1,6 +1,6 @@
discard """
cmd: '''nim c --newruntime $file'''
output: '''442 442'''
output: '''443 443'''
"""
import strutils, os
@ -10,7 +10,6 @@ import system / ansi_c
# bug #11004
proc retTuple(): (seq[int], int) =
# XXX this doesn't allocate yet but probably it should
return (@[1], 1)
proc nonStaticTests =