diff options
author | Judd <foldl@outlook.com> | 2020-04-21 20:50:16 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-21 14:50:16 +0200 |
commit | 04c326569bdafa619d6596d2d674d3acbcc1ecf3 (patch) | |
tree | 82bc02bdb92dc2a60e9d5a3164489f0d5580b3d5 /tests | |
parent | 1a44b7e3ced0e2d092f2c607d61a6b28c1ca339c (diff) | |
download | Nim-04c326569bdafa619d6596d2d674d3acbcc1ecf3.tar.gz |
fix mapIt issues #12625 & #12639 (#14041)
* fix mapIt issues #12625 & #12639: 1. fallback to call `map` when the result of `op` is a closure; 2. use `items(s)` in the for loop. * fix test errors. * add comments and InType is moved. * fix ident.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/collections/tseq.nim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/collections/tseq.nim b/tests/collections/tseq.nim index 6a28bc8e6..ac68e5636 100644 --- a/tests/collections/tseq.nim +++ b/tests/collections/tseq.nim @@ -204,3 +204,6 @@ block ttoseq: var y: type("a b c".split) y = "xzy" stdout.write("\n") + +block tseqmapitchain: + doAssert @[101, 102] == [1, 2].mapIt(func (x: int): int = it + x).mapIt(it(100)) \ No newline at end of file |