Fixed copying of aggregates in JS.
This commit is contained in:
parent
a041ef68a1
commit
6436d1920c
3 changed files with 45 additions and 24 deletions
13
tests/js/tcopying.nim
Normal file
13
tests/js/tcopying.nim
Normal 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]
|
||||
Loading…
Add table
Add a link
Reference in a new issue