summary refs log tree commit diff stats
path: root/lib/pure/sugar.nim
diff options
context:
space:
mode:
authorhlaaftana <10591326+hlaaftana@users.noreply.github.com>2021-02-09 15:04:36 +0300
committerGitHub <noreply@github.com>2021-02-09 13:04:36 +0100
commit49ee2f7f3bb943eb56db9ef16c709df1b3bd0f0a (patch)
tree96966eb94c680781ba7fcdf757a120b4b01e2540 /lib/pure/sugar.nim
parent41d32c3ea3ef0dd1ce3eed27d1ec312b7d0ecf7e (diff)
downloadNim-49ee2f7f3bb943eb56db9ef16c709df1b3bd0f0a.tar.gz
fix #16967 [backport:1.2] (#16976)
* fix #16967 [backport:1.2]

* move test to tsugar
Diffstat (limited to 'lib/pure/sugar.nim')
-rw-r--r--lib/pure/sugar.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pure/sugar.nim b/lib/pure/sugar.nim
index 5cece12b6..cc681a0a6 100644
--- a/lib/pure/sugar.nim
+++ b/lib/pure/sugar.nim
@@ -242,7 +242,7 @@ macro capture*(locals: varargs[typed], body: untyped): untyped {.since: (1, 1).}
       error("The variable name cannot be `result`!", arg)
     params.add(newIdentDefs(ident(arg.strVal), freshIdentNodes getTypeInst arg))
   result = newNimNode(nnkCall)
-  result.add(newProc(newEmptyNode(), params, body, nnkProcDef))
+  result.add(newProc(newEmptyNode(), params, body, nnkLambda))
   for arg in locals: result.add(arg)
 
 since (1, 1):