fixes a JS codegen regression
This commit is contained in:
parent
c1d061bb5a
commit
5932ad9ae8
2 changed files with 41 additions and 3 deletions
|
|
@ -10,6 +10,7 @@ bar 12
|
|||
(nums: @[5, 5, 50, 5, 5, 5, 5, 5, 5, 5])
|
||||
(nums: @[5, 5, 45, 5, 5, 5, 5, 5, 5, 5])
|
||||
(nums: @[5, 5, 9, 5, 5, 5, 5, 5, 5, 5])
|
||||
asd
|
||||
'''
|
||||
"""
|
||||
|
||||
|
|
@ -102,3 +103,20 @@ f[2] -= 5
|
|||
echo f
|
||||
f[2] /= 5
|
||||
echo f
|
||||
|
||||
# regression for #5608
|
||||
import tables
|
||||
|
||||
type
|
||||
SomeObj = ref object
|
||||
s: cstring
|
||||
|
||||
var a = initTable[cstring, Table[cstring, SomeObj]]()
|
||||
|
||||
var b = initTable[cstring, SomeObj]()
|
||||
|
||||
b.add(cstring"b", SomeObj(s: cstring"asd"))
|
||||
|
||||
a.add(cstring"a", b)
|
||||
|
||||
echo a[cstring"a"][cstring"b"].s
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue