destructors: lift type bound ops to objects and arrays etc

This commit is contained in:
Andreas Rumpf 2017-10-17 14:48:16 +02:00
commit 58d5f96790
4 changed files with 71 additions and 32 deletions

View file

@ -4,7 +4,7 @@ foo bar to appendmore here
foo bar to appendmore here
foo bar to appendmore here
foo bar to appendmore here
after 16 16'''
after 20 20'''
cmd: '''nim c --newruntime $file'''
"""
@ -92,5 +92,8 @@ proc main(n: int) =
a.add c
echo cstring(a.data)
var x: array[4, mystring]
for i in 0..high(x): x[i] = create"added to array"
main(1000)
echo "after ", allocCount, " ", deallocCount