Documentation only, Sugar arrow and semicolons (#18574)

* Document that sugar arrow do not support semicolon as argument separator
This commit is contained in:
Juan Carlos
2021-07-25 13:07:43 -03:00
committed by GitHub
parent 2cbfc1e514
commit e08ec0c674

View File

@@ -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: