Skip to content

Commit 44bce78

Browse files
authored
Update main-annotation.md
the relation between parameters and supplied arguments seems to be inverted
1 parent 634c580 commit 44bce78

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/_docs/reference/experimental/main-annotation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,16 @@ import scala.util.CommandLineParser.FromString[T]
6565
None
6666
else if info.hasVarargs then
6767
val numPlainArgs = info.parameters.length - 1
68-
if numPlainArgs <= args.length then
68+
if numPlainArgs > args.length then
6969
println("Not enough arguments")
7070
None
7171
else
7272
Some(args)
7373
else
74-
if info.parameters.length <= args.length then
74+
if info.parameters.length > args.length then
7575
println("Not enough arguments")
7676
None
77-
else if info.parameters.length >= args.length then
77+
else if info.parameters.length < args.length then
7878
println("Too many arguments")
7979
None
8080
else

0 commit comments

Comments
 (0)