While this sounds like a useful thing to have in a language (there are many annotations like this for Android developers checked by IDE), I think explicitly stating in your code your requirements about
vararg
param is not much worse:
Copy code
fun myFun(vararg myVararg: Any) {
if (myVararg.size < 1) throwSth()
...
Copy code
fun myFun(@Elements(min = 1) vararg myVararg: Any) {
...