Skip to content

Commit f8886c7

Browse files
Per-Kristiansarahhaggarty
authored andcommitted
Clarify named argument requirement after vararg parameter
1 parent e833b1f commit f8886c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/topics/functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ Inside a function, a `vararg`-parameter of type `T` is visible as an array of `T
220220
variable has type `Array<out T>`.
221221

222222
Only one parameter can be marked as `vararg`. If a `vararg` parameter is not the last one in the list, values for the
223-
subsequent parameters can be passed using named argument syntax, or, if the parameter has a function type, by passing
223+
subsequent parameters must be passed using named argument syntax, or, if the parameter has a function type, by passing
224224
a lambda outside the parentheses.
225225

226226
When you call a `vararg`-function, you can pass arguments individually, for example `asList(1, 2, 3)`. If you already have

0 commit comments

Comments
 (0)