From dad99376a55e61f83606956a0c1cab289387d1d5 Mon Sep 17 00:00:00 2001 From: Dominik Picheta Date: Sun, 20 Apr 2014 22:08:03 +0100 Subject: [PATCH] Param name and type combos now work in type sig. sugar. --- lib/pure/future.nim | 11 +++++++++-- tests/closure/tclosuremacro.nim | 8 ++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/lib/pure/future.nim b/lib/pure/future.nim index 2401c4f72..349ee2dcc 100644 --- a/lib/pure/future.nim +++ b/lib/pure/future.nim @@ -26,8 +26,15 @@ proc createProcType(p, b: PNimrodNode): PNimrodNode {.compileTime.} = for i in 0 .. x + y) noReturn(() -> void => echo("noReturn")) -when false: - proc pass2(f: (int, int) -> int): (int) -> int = - (x: int) -> int => f(2, x) +proc pass2(f: (int, int) -> int): (int) -> int = + (x: int) -> int => f(2, x) - #echo pass2((x, y) => x + y) +echo pass2((x, y) => x + y)(4)