Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Kotlin example in user manual for new 1.2 syntax #255

Closed
remkop opened this issue Dec 31, 2017 · 0 comments
Closed

Update Kotlin example in user manual for new 1.2 syntax #255

remkop opened this issue Dec 31, 2017 · 0 comments

Comments

@remkop
Copy link
Owner

remkop commented Dec 31, 2017

Update link in picocli user manual: http://picocli.info/#_kotlin

Kotlin 1.2 (released Nov 28, 2017) officially supports Array literals in annotations:
http://kotlinlang.org/docs/reference/whatsnew12.html#array-literals-in-annotations

TODO: check if the array literals are needed for single-element literals

// Kotlin 1.2+:
@AnnWithArrayMethod(names = ["abc", "foo", "bar"]) 
class C {}

// Older Kotlin versions:
@AnnWithArrayMethod(names = arrayOf("abc", "foo", "bar")) 
class D {}

// TODO is this possible in Kotlin 1.2?
@AnnWithArrayMethod(names = "abc") 
class E {}
@remkop remkop added this to the 2.2.1 milestone Dec 31, 2017
remkop added a commit that referenced this issue Jan 2, 2018
remkop added a commit that referenced this issue Jan 2, 2018
@remkop remkop closed this as completed Jan 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant