summary refs log tree commit diff stats
path: root/tests/destructor
diff options
context:
space:
mode:
authorClyybber <darkmine956@gmail.com>2019-04-15 17:06:31 +0200
committerAndreas Rumpf <rumpf_a@web.de>2019-04-15 17:06:31 +0200
commit2f56dd6b2b5b242409ce297d618a5f6db331e30a (patch)
tree43e2c1e6ff5453b2dd68053d6978ed57f1abd81c /tests/destructor
parenta68c5662f2e3fa732a330ff373cf224495472372 (diff)
downloadNim-2f56dd6b2b5b242409ce297d618a5f6db331e30a.tar.gz
Extend the fix for #11018 to strings (#11031)
* Extend the fix for #11018 to strings

* Fix testcase
Diffstat (limited to 'tests/destructor')
-rw-r--r--tests/destructor/tv2_cast.nim10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/destructor/tv2_cast.nim b/tests/destructor/tv2_cast.nim
index 1430b7521..82c03fb17 100644
--- a/tests/destructor/tv2_cast.nim
+++ b/tests/destructor/tv2_cast.nim
@@ -1,7 +1,9 @@
 discard """
   cmd: '''nim c --newruntime $file'''
   output: '''@[1]
-@[116, 101, 115, 116]'''
+@[116, 101, 115, 116]
+test
+@[1953719668, 875770417]'''
 """
 
 # bug #11018
@@ -9,3 +11,9 @@ discard cast[seq[uint8]](@[1])
 discard cast[seq[uint8]]("test")
 echo cast[seq[uint8]](@[1])
 echo cast[seq[uint8]]("test")
+
+discard cast[string](@[116'u8, 101, 115, 116])
+echo cast[string](@[116'u8, 101, 115, 116])
+var a = cast[seq[uint32]]("test1234")
+a.setLen(2)
+echo a