summary refs log tree commit diff stats
path: root/tests/js/t7249.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/js/t7249.nim')
-rw-r--r--tests/js/t7249.nim21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/js/t7249.nim b/tests/js/t7249.nim
new file mode 100644
index 000000000..52eee2f7c
--- /dev/null
+++ b/tests/js/t7249.nim
@@ -0,0 +1,21 @@
+discard """
+  output: '''
+a -> 2
+a <- 2
+'''
+"""
+
+import jsffi
+
+var a = JsAssoc[cstring, int]{a: 2}
+
+for z, b in a:
+  echo z, " -> ", b
+
+proc f =
+  var a = JsAssoc[cstring, int]{a: 2}
+
+  for z, b in a:
+    echo z, " <- ", b
+
+f()