Documentation only, Sugar arrow and semicolons (#18574)
* Document that sugar arrow do not support semicolon as argument separator
This commit is contained in:
parent
2cbfc1e514
commit
e08ec0c674
1 changed files with 4 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue