Sets need copying in JS (#11392)
* Sets need copying in JS * Fixes #11353 * Add test for #11353
This commit is contained in:
parent
ad13e18c7c
commit
ba43156363
2 changed files with 15 additions and 1 deletions
14
tests/js/t11353.nim
Normal file
14
tests/js/t11353.nim
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
discard """
|
||||
output: '''
|
||||
{}
|
||||
{}
|
||||
'''
|
||||
"""
|
||||
|
||||
proc foo() =
|
||||
var bar: set[int16] = {}
|
||||
echo bar
|
||||
bar.incl(1)
|
||||
|
||||
foo()
|
||||
foo()
|
||||
Loading…
Add table
Add a link
Reference in a new issue