summary refs log tree commit diff stats
path: root/tests/js/tbyvar.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-07-10 16:40:23 +0200
committerAndreas Rumpf <rumpf_a@web.de>2017-07-10 16:40:23 +0200
commit5932ad9ae84d1a06dfe36a08a7d38ac9f6592767 (patch)
tree7c21f6ee350ccc607cda96557092f090fe9f6d93 /tests/js/tbyvar.nim
parentc1d061bb5aa71a9bccfac0584196d62bf6aeab1f (diff)
downloadNim-5932ad9ae84d1a06dfe36a08a7d38ac9f6592767.tar.gz
fixes a JS codegen regression
Diffstat (limited to 'tests/js/tbyvar.nim')
-rw-r--r--tests/js/tbyvar.nim18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/js/tbyvar.nim b/tests/js/tbyvar.nim
index e3690df98..705d62574 100644
--- a/tests/js/tbyvar.nim
+++ b/tests/js/tbyvar.nim
@@ -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