summary refs log tree commit diff stats
path: root/tests/closure
diff options
context:
space:
mode:
authorDominik Picheta <dominikpicheta@gmail.com>2016-01-16 14:14:29 +0000
committerDominik Picheta <dominikpicheta@gmail.com>2016-01-16 14:14:29 +0000
commita395182dd7577ffa099b351ff7adfd3bb6939d54 (patch)
treec2b1ce7d702e79726087cfcd4019af3c01b65db4 /tests/closure
parent23cebff5fc18941ea72d0afb8235536b0b8dcab1 (diff)
downloadNim-a395182dd7577ffa099b351ff7adfd3bb6939d54.tar.gz
Added test for code in @def-'s comment in #1502.
Diffstat (limited to 'tests/closure')
-rw-r--r--tests/closure/tissue1502def.nim6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/closure/tissue1502def.nim b/tests/closure/tissue1502def.nim
new file mode 100644
index 000000000..0aa6b16e3
--- /dev/null
+++ b/tests/closure/tissue1502def.nim
@@ -0,0 +1,6 @@
+import sequtils
+let xs: seq[tuple[key: string, val: seq[string]]] = @[("foo", @["bar"])]
+
+let maps = xs.map(
+  proc(x: auto): tuple[typ: string, maps: seq[string]] =
+    (x.key, x.val.map(proc(x: string): string = x)))
\ No newline at end of file