mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-21 14:55:24 +00:00
Fixed copying of aggregates in JS.
This commit is contained in:
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]
|
||||
Reference in New Issue
Block a user