diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2019-06-22 01:52:49 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-06-22 01:52:49 +0200 |
commit | 79c721d41814b4ec5f5c6e32c2093125cb41258c (patch) | |
tree | eff7be746b14eb7eaa247c78dfced1f17de94a4f /tests | |
parent | 0db3c670ac46d431b86275d245b3b4ec0dd6c372 (diff) | |
download | Nim-79c721d41814b4ec5f5c6e32c2093125cb41258c.tar.gz |
[bugfix] fixes #11524
Diffstat (limited to 'tests')
-rw-r--r-- | tests/destructor/tgcdestructors.nim | 11 | ||||
-rw-r--r-- | tests/destructor/tnewruntime_strutils.nim | 3 |
2 files changed, 11 insertions, 3 deletions
diff --git a/tests/destructor/tgcdestructors.nim b/tests/destructor/tgcdestructors.nim index bc9f57d20..e0f973ecc 100644 --- a/tests/destructor/tgcdestructors.nim +++ b/tests/destructor/tgcdestructors.nim @@ -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) diff --git a/tests/destructor/tnewruntime_strutils.nim b/tests/destructor/tnewruntime_strutils.nim index 5b8684354..c77177f58 100644 --- a/tests/destructor/tnewruntime_strutils.nim +++ b/tests/destructor/tnewruntime_strutils.nim @@ -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 = |