diff options
author | Ernie Rael <errael@raelity.com> | 2023-10-23 19:08:38 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2023-10-23 19:13:16 +0200 |
commit | a5a1534753db361f6320e766014d42602c79537f (patch) | |
tree | 21eec56678c3eadf08c05f7bb0522cfaf1892cd8 /runtime/doc/vim9.txt | |
parent | fea96c00e55a71e3007907ff4f7ad513bb9ff0eb (diff) |
runtime(doc): small updates to the documentation for varargs
- update and correct the documentation for varargs for Vim9 and make
sure to mention that a <list> type is required.
- mention that 3match is used the matchparen plugin before 9.0.2054
(actually this is not correct, but before that patch, Vim used the
hardcoded id 3)
closes: #13403
closes: #13409
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
Diffstat (limited to 'runtime/doc/vim9.txt')
-rw-r--r-- | runtime/doc/vim9.txt | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/runtime/doc/vim9.txt b/runtime/doc/vim9.txt index 58d9ed6142..bba68ad4a8 100644 --- a/runtime/doc/vim9.txt +++ b/runtime/doc/vim9.txt @@ -1,4 +1,4 @@ -*vim9.txt* For Vim version 9.0. Last change: 2023 Jun 10 +*vim9.txt* For Vim version 9.0. Last change: 2023 Oct 23 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1487,13 +1487,14 @@ func({type}) function with argument type, does not return func({type}): {type} function with argument type and return type func(?{type}) function with type of optional argument, does not return a value -func(...{type}) function with type of variable number of - arguments, does not return a value -func({type}, ?{type}, ...{type}): {type} +func(...list<{type}>) function with type of list for variable number + of arguments, does not return a value +func({type}, ?{type}, ...list<{type}>): {type} function with: - type of mandatory argument - type of optional argument - - type of variable number of arguments + - type of list for variable number of + arguments - return type If the return type is "void" the function does not return a value. @@ -1687,8 +1688,8 @@ argument type checking: > var FuncUnknownArgs: func: number FuncUnknownArgs = (v): number => v # OK FuncUnknownArgs = (v1: string, v2: string): number => 3 # OK -< FuncUnknownArgs = (...v1: list<string>): number => 333 # OK - + FuncUnknownArgs = (...v1: list<string>): number => 333 # OK +< *E1211* *E1217* *E1218* *E1219* *E1220* *E1221* *E1222* *E1223* *E1224* *E1225* *E1226* *E1227* *E1228* *E1238* *E1250* *E1251* *E1252* *E1256* |