Skip to content

Commit 704ba68

Browse files
committed
fix a runnableExamples thanks to this bugfix
1 parent f7900f8 commit 704ba68

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/pure/sugar.nim

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ proc createProcType(p, b: NimNode): NimNode {.compileTime.} =
5454

5555
macro `=>`*(p, b: untyped): untyped =
5656
## Syntax sugar for anonymous procedures. It also supports pragmas.
57-
# TODO: xxx pending #13491: uncomment in runnableExamples
5857
runnableExamples:
5958
proc passTwoAndTwo(f: (int, int) -> int): int = f(2, 2)
6059

@@ -69,8 +68,8 @@ macro `=>`*(p, b: untyped): untyped =
6968
myBot.call = (name: string) {.noSideEffect.} => "Hello " & name & ", I'm a bot."
7069
assert myBot.call("John") == "Hello John, I'm a bot."
7170

72-
# let f = () => (discard) # simplest proc that returns void
73-
# f()
71+
let f = () => (discard) # simplest proc that returns void
72+
f()
7473

7574
var
7675
params = @[ident"auto"]

0 commit comments

Comments
 (0)