From 968dedb77091c51653251cb33a95de9e47edf00c Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Sun, 30 Sep 2018 10:37:37 +0200 Subject: [PATCH] workaround for #9130 --- lib/pure/collections/sequtils.nim | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/pure/collections/sequtils.nim b/lib/pure/collections/sequtils.nim index 330689c834623..a6bc593b7eae6 100644 --- a/lib/pure/collections/sequtils.nim +++ b/lib/pure/collections/sequtils.nim @@ -548,10 +548,9 @@ template toSeq2(iter: iterator): untyped = template toSeq*(iter: untyped): untyped = ## Transforms any iterable into a sequence. runnableExamples: - import sugar let numeric = @[1, 2, 3, 4, 5, 6, 7, 8, 9] - odd_numbers = toSeq(filter(numeric, x => x mod 2 == 1)) + odd_numbers = toSeq(filter(numeric, proc(x: int): bool = x mod 2 == 1)) doAssert odd_numbers == @[1, 3, 5, 7, 9] when compiles(toSeq1(iter)):