dmitry.petrov
06/06/2016, 9:26 AMobject A {
operator fun <T> get(vararg x: T): Array<out T> = x
}
val test1: MutableList<Int> = A[1, 2, 3].toMutableList()
val test2: Set<String> = A["1", "2", "3"].toSet()
This would not work for annotations, though.