Merge pull request #2902 from yglukhov/js-copying-fix

Fixed copying of aggregates in JS.
This commit is contained in:
Andreas Rumpf 2015-06-12 00:30:49 +02:00
commit e36c12ee37
3 changed files with 45 additions and 24 deletions

13
tests/js/tcopying.nim Normal file
View file

@ -0,0 +1,13 @@
discard """
output: '''123
'''
"""
type MyArray = array[1, int]
proc changeArray(a: var MyArray) =
a = [123]
var a : MyArray
changeArray(a)
echo a[0]