summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2021-03-08 22:09:24 -0800
committerGitHub <noreply@github.com>2021-03-09 07:09:24 +0100
commitd161d27cddcbc8b3a9351ffa35960d4e917e7365 (patch)
treec21071231cb746af6fbb221c9c075c93dc297140 /lib
parent6cb26d8010cecf480d909a80e143c168996cfd34 (diff)
downloadNim-d161d27cddcbc8b3a9351ffa35960d4e917e7365.tar.gz
fix #13491 #17279 runnableExamples now don't get lost in translation (#17282)
* fix #13491 runnableExamples rendering
* fix a runnableExamples thanks to this bugfix
Diffstat (limited to 'lib')
-rw-r--r--lib/pure/sugar.nim5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/pure/sugar.nim b/lib/pure/sugar.nim
index aa1cc5fb8..9654a0678 100644
--- a/lib/pure/sugar.nim
+++ b/lib/pure/sugar.nim
@@ -54,7 +54,6 @@ proc createProcType(p, b: NimNode): NimNode {.compileTime.} =
 
 macro `=>`*(p, b: untyped): untyped =
   ## Syntax sugar for anonymous procedures. It also supports pragmas.
-  # TODO: xxx pending #13491: uncomment in runnableExamples
   runnableExamples:
     proc passTwoAndTwo(f: (int, int) -> int): int = f(2, 2)
 
@@ -69,8 +68,8 @@ macro `=>`*(p, b: untyped): untyped =
     myBot.call = (name: string) {.noSideEffect.} => "Hello " & name & ", I'm a bot."
     assert myBot.call("John") == "Hello John, I'm a bot."
 
-    # let f = () => (discard) # simplest proc that returns void
-    # f()
+    let f = () => (discard) # simplest proc that returns void
+    f()
 
   var
     params = @[ident"auto"]