Skip to content

Commit

Permalink
Add covariance to main method (#197)
Browse files Browse the repository at this point in the history
Fixes #196
  • Loading branch information
ajalt committed Jun 20, 2020
1 parent 3af97bb commit e5604b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -7,6 +7,7 @@
### Changed
- When `printHelpOnEmptyArgs` is `true` and no arguments are present, or when `invokeWithoutSubcommand` is `false` and no subcommand is present, `CliktCommand.main` will now exit with status code 1 rather than 0.
- `restrictTo` now works with any `Comparable` value, not just `Number`.
- `CliktCommand.main` now accepts `Array<out String>`, not just `Array<String>`.

### Fixed
- Fixed option values being reset when calling multiple subcommands with `allowMultipleSubcommands=true` ([#190](https://github.com/ajalt/clikt/issues/190))
Expand Down
Expand Up @@ -295,7 +295,7 @@ abstract class CliktCommand(
}
}

fun main(argv: Array<String>) = main(argv.asList())
fun main(argv: Array<out String>) = main(argv.asList())

/**
* Perform actions after parsing is complete and this command is invoked.
Expand Down

0 comments on commit e5604b1

Please sign in to comment.