mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-20 14:25:23 +00:00
fix some trivial errors in the test suite and some more regressions caused by tyTypeDesc[tyNone]
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
discard """
|
||||
output: "10\n10"
|
||||
output: "10\n10\n1\n2\n3"
|
||||
"""
|
||||
|
||||
proc test(x: proc (a, b: int): int) =
|
||||
@@ -8,3 +8,11 @@ proc test(x: proc (a, b: int): int) =
|
||||
test(proc (a, b): auto = a + b)
|
||||
|
||||
test do (a, b) -> auto: a + b
|
||||
|
||||
proc foreach[T](s: seq[T], body: proc(x: T)) =
|
||||
for e in s:
|
||||
body(e)
|
||||
|
||||
foreach(@[1,2,3]) do (x):
|
||||
echo x
|
||||
|
||||
|
||||
Reference in New Issue
Block a user