diff options
author | metagn <metagngn@gmail.com> | 2023-04-06 14:21:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-06 13:21:48 +0200 |
commit | 4898b054ce3b538193fb1bda9052cebc4a588f2f (patch) | |
tree | b6ecb1b39851d3af1a0de943d2ec5c9ac67776c8 /doc/manual.md | |
parent | baa577e9e8d59b176ac0cf805f4ef80ebd8bfe9b (diff) | |
download | Nim-4898b054ce3b538193fb1bda9052cebc4a588f2f.tar.gz |
warn against `a, b = val` in routine arguments (#21604)
closes https://github.com/nim-lang/RFCs/issues/480
Diffstat (limited to 'doc/manual.md')
-rw-r--r-- | doc/manual.md | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/doc/manual.md b/doc/manual.md index 850a04b0d..042773bcb 100644 --- a/doc/manual.md +++ b/doc/manual.md @@ -3816,15 +3816,6 @@ every time the function is called. proc foo(a: int, b: int = 47): int ``` -Just as the comma propagates the types from right to left until the -first parameter or until a semicolon is hit, it also propagates the -default value starting from the parameter declared with it. - - ```nim - # Both a and b are optional with 47 as their default values. - proc foo(a, b: int = 47): int - ``` - Parameters can be declared mutable and so allow the proc to modify those arguments, by using the type modifier `var`. |