mirror of
https://github.com/nim-lang/Nim.git
synced 2026-08-30 18:41:45 +00:00
fixes #2073
This commit is contained in:
15
tests/closure/ttimeinfo.nim
Normal file
15
tests/closure/ttimeinfo.nim
Normal file
@@ -0,0 +1,15 @@
|
||||
# bug #2073
|
||||
|
||||
import sequtils
|
||||
import times
|
||||
|
||||
# 1
|
||||
proc f(n: int): TimeInfo =
|
||||
TimeInfo(year: n, month: mJan, monthday: 1)
|
||||
|
||||
echo toSeq(2000 || 2015).map(f)
|
||||
|
||||
# 2
|
||||
echo toSeq(2000 || 2015).map(proc (n: int): TimeInfo =
|
||||
TimeInfo(year: n, month: mJan, monthday: 1)
|
||||
)
|
||||
Reference in New Issue
Block a user