mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-03 11:42:33 +00:00
Added test for code in @def-'s comment in #1502.
This commit is contained in:
6
tests/closure/tissue1502def.nim
Normal file
6
tests/closure/tissue1502def.nim
Normal file
@@ -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)))
|
||||
Reference in New Issue
Block a user