diff options
author | Juan Carlos <juancarlospaco@gmail.com> | 2021-07-25 13:07:43 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-25 18:07:43 +0200 |
commit | e08ec0c6745e54de4e174970e513acef3b0d8f5e (patch) | |
tree | 9473d40a9759afad6df60d3d013a4e8e157cdfba | |
parent | 2cbfc1e51470bae7bc3570caf4432bd062f11599 (diff) | |
download | Nim-e08ec0c6745e54de4e174970e513acef3b0d8f5e.tar.gz |
Documentation only, Sugar arrow and semicolons (#18574)
* Document that sugar arrow do not support semicolon as argument separator
-rw-r--r-- | lib/pure/sugar.nim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/pure/sugar.nim b/lib/pure/sugar.nim index 7cfa932e6..f82e1706f 100644 --- a/lib/pure/sugar.nim +++ b/lib/pure/sugar.nim @@ -54,6 +54,8 @@ proc createProcType(p, b: NimNode): NimNode = macro `=>`*(p, b: untyped): untyped = ## Syntax sugar for anonymous procedures. It also supports pragmas. + ## + ## .. warning:: Semicolons can not be used to separate procedure arguments. runnableExamples: proc passTwoAndTwo(f: (int, int) -> int): int = f(2, 2) @@ -133,6 +135,8 @@ macro `=>`*(p, b: untyped): untyped = macro `->`*(p, b: untyped): untyped = ## Syntax sugar for procedure types. It also supports pragmas. + ## + ## .. warning:: Semicolons can not be used to separate procedure arguments. runnableExamples: proc passTwoAndTwo(f: (int, int) -> int): int = f(2, 2) # is the same as: |